Page MenuHomePhabricator

[Cashtab] Ignore tx history for large-input txs
ClosedPublic

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

Details

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

T1824

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

Repository
rABC Bitcoin ABC
Branch
patch-api-overload-txs
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16616
Build 33087: Build Diffcashtab-tests
Build 33086: arc lint + arc unit

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.Sep 13 2021, 14:04