Page MenuHomePhabricator

[Cashtab] Ignore tx history for large-input txs

Authored by bytesofman on Mon, Sep 13, 13:10.


Group Reviewers
Restricted Project
rABC0c069e0070f3: [Cashtab] Ignore tx history for large-input txs


The`BCH.RawTransactions.getTxData(txid) function from bch-js` chokes on transactions with a large amount of inputs. In this case, it returns undefined instead of an object.

This means that if your wallet has such a tx in the last 5 txs, it will always through an API rate limit error, making Cashtab impossible to use.

This diff catches such cases and omits them from the tx history.

This fix prevents the wallet crash error. However, a more permanent way to deal with this would be to improve the function in bch-js.

Test Plan
  1. DM me for a recovery seed of a wallet with such a transaction
  2. Import the wallet.
  3. Note that it loads with < 5 txs in history but does not instantly rate limit.

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

bytesofman updated this revision to Diff 29901.

Removing line break irrelevant to this diff

Instead of removing txs, replace with empty box that links to explorer

This revision is now accepted and ready to land.Mon, Sep 13, 14:04