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 @@ -91,6 +91,13 @@ const parsedTxHistory = []; for (let i = 0; i < txData.length; i += 1) { const tx = txData[i]; + // If this tx had too many inputs to be parsed by getTxDataWithPassThrough, skip it + // When this occurs, the tx will only have txid and height + // So, it will not have 'vin' + if (!Object.keys(tx).includes('vin')) { + // Do not include this tx in history as parsing will always hit rate limits + continue; + } const parsedTx = {}; // Move over info that does not need to be calculated parsedTx.txid = tx.txid; @@ -177,9 +184,17 @@ const getTxDataWithPassThrough = async (BCH, flatTx) => { // necessary as BCH.RawTransactions.getTxData does not return address or blockheight - const txDataWithPassThrough = await BCH.RawTransactions.getTxData( - flatTx.txid, - ); + let txDataWithPassThrough = {}; + try { + txDataWithPassThrough = await BCH.RawTransactions.getTxData( + flatTx.txid, + ); + } catch (err) { + console.log( + `Error in BCH.RawTransactions.getTxData(${flatTx.txid})`, + ); + console.log(err); + } txDataWithPassThrough.height = flatTx.height; txDataWithPassThrough.address = flatTx.address; return txDataWithPassThrough;