fix cryptos with null networks/contractAddresses

This commit is contained in:
sneurlax 2023-01-20 15:45:53 -06:00
parent c3dd04b830
commit 2e6dfe0f62

View file

@ -25,11 +25,11 @@ class Crypto {
factory Crypto.fromJson(Map<String, dynamic> json) { factory Crypto.fromJson(Map<String, dynamic> json) {
try { try {
return Crypto( return Crypto(
ticker: json["ticker"] as String, ticker: "${json['ticker']}",
name: json["name"] as String, name: "${json['name']}",
network: json["network"] as String, network: "${json['network']}",
contractAddress: json["contractAddress"] as String, contractAddress: "${json['contractAddress']}",
image: json["image"] as String, image: "${json['image']}",
); );
} catch (e) { } catch (e) {
rethrow; rethrow;