[Cashtab] fetchTxDataForNullUtxos array threshold fix
Summary:
- The fetchTxDataForNullUtxos() function in useBCH.js builds an array of tx IDs and then passes them to BCH.Electrumx.txData() to retrieve the corresponding transaction data.
- The problem is BCH.Electrumx.txData() is limited to 20 TXIDs per request according to the spec, and wallets with > 20 null utxos will cause this api call to throw an 'array too large' error and fetchTxDataForNullUtxos()'s catch logic ignores the entire utxo set.
- This diff batches up the array into 20 elements each before making the API call.
Test Plan:
- npm start
- find a wallet with > 20 nullUtxos (e.g. https://explorer.be.cash/address/ecash:qq9h6d0a5q65fgywv4ry64x04ep906mdku8f0gxfgx)
- send a message transaction and ensure the balance is updated as well as the tx history in Cashtab
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D10668