Page MenuHomePhabricator

Error handling for slp send
AbandonedPublic

Authored by bytesofman on Dec 2 2020, 21:23.

Details

Reviewers
alcipir
majcosta
Group Reviewers
Restricted Project
Summary

Prevent CashTab from creating an SLPA send transaction that sends more than the user's
balance. The balance error will be corrected in bch-api.

Test Plan

Confirm tests still pass:

npm test

Confirm app still runs locally:

npm start

This patch handles a specific edge case where the user has a token with 9 decimal places of precision
and bch-api is returning an off-by-one rounded balance. To test this specific case, create an SLPA
token with 9 decimal places. Send 0.000000001 of it to another SLPA address. Your CashTab balance will not change.
Then attempt to send all of that SLPA token. CashTab will throw an error.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
slp-api-error-handling
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14278
Build 28532: Build Diff
Build 28531: arc lint + arc unit