[Cashtab] Better handling of edge case utxo selection
Summary:
Depends on D18288
The current utxo selection approach in the sendXec function is incorrect. We can get into a situation where we need one more utxo, but we exit the loop without adding it and throw an 'insufficient funds' error.
Patch the logic to prevent this case.
Test Plan:
npm test
review the CI tests of D18290 to show that this exact test case throws an error on current prod
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D18289