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 @@ -218,6 +218,17 @@ wallet.Path1899.publicKey, ]; + // Check that server is live + try { + await BCH.Blockchain.getBlockCount(); + } catch (err) { + console.log( + `Error in BCH.Blockchain.getBlockCount, the full node is likely down`, + err, + ); + throw new Error(`Node unavailable`); + } + const utxos = await getUtxos(BCH, cashAddresses); // If an error is returned or utxos from only 1 address are returned