From 1fd7e129e25f531cc6bf8962bea5aeed4e5dd37a Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 23 Mar 2023 13:51:56 -0600 Subject: [PATCH] empty token tx check --- lib/services/ethereum/ethereum_token_service.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/services/ethereum/ethereum_token_service.dart b/lib/services/ethereum/ethereum_token_service.dart index ef6f25794..4aa431f3a 100644 --- a/lib/services/ethereum/ethereum_token_service.dart +++ b/lib/services/ethereum/ethereum_token_service.dart @@ -296,6 +296,12 @@ class EthTokenWallet extends ChangeNotifier with EthTokenCache { throw response.exception ?? 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( response.value!.map((e) => e.transactionHash).toList(), );