diff --git a/web/cashtab/src/hooks/useBCH.js b/web/cashtab/src/hooks/useBCH.js --- a/web/cashtab/src/hooks/useBCH.js +++ b/web/cashtab/src/hooks/useBCH.js @@ -566,6 +566,7 @@ return utxosResponse.utxos; } catch (err) { console.log(`Error in BCH.Electrumx.utxo(addresses):`); + console.log(err); return err; } }; diff --git a/web/cashtab/src/hooks/useWallet.js b/web/cashtab/src/hooks/useWallet.js --- a/web/cashtab/src/hooks/useWallet.js +++ b/web/cashtab/src/hooks/useWallet.js @@ -229,7 +229,13 @@ const utxos = await getUtxos(BCH, cashAddresses); // If an error is returned or utxos from only 1 address are returned - if (!utxos || isEmpty(utxos) || utxos.error || utxos.length < 2) { + if ( + !utxos || + !Array.isArray(utxos) || + isEmpty(utxos) || + utxos.error || + utxos.length < 2 + ) { // Throw error here to prevent more attempted api calls // as you are likely already at rate limits throw new Error('Error fetching utxos');