list type cast fix

This commit is contained in:
julian 2023-11-06 11:23:03 -06:00
parent f778a9309f
commit 5ddf3e3a53

View file

@ -69,8 +69,15 @@ class WalletInfo implements IsarId {
bool get isFavourite => favouriteOrderIndex > -1;
List<String> get tokenContractAddresses =>
otherData[WalletInfoKeys.tokenContractAddresses] as List<String>? ?? [];
List<String> get tokenContractAddresses {
if (otherData[WalletInfoKeys.tokenContractAddresses] is List) {
return List<String>.from(
otherData[WalletInfoKeys.tokenContractAddresses] as List,
);
} else {
return [];
}
}
/// Special case for coins such as firo
@ignore