empty token tx check

This commit is contained in:
julian 2023-03-23 13:51:56 -06:00
parent 09b2c68cd5
commit 1fd7e129e2

View file

@ -296,6 +296,12 @@ class EthTokenWallet extends ChangeNotifier with EthTokenCache {
throw response.exception ?? throw response.exception ??
Exception("Failed to fetch token transaction data"); Exception("Failed to fetch token transaction data");
} }
// no need to continue if no transactions found
if (response.value!.isEmpty) {
return;
}
final response2 = await EthereumAPI.getEthTokenTransactionsByTxids( final response2 = await EthereumAPI.getEthTokenTransactionsByTxids(
response.value!.map((e) => e.transactionHash).toList(), response.value!.map((e) => e.transactionHash).toList(),
); );