Page MenuHomePhabricator

[Cashtab] Use XEC balance change to unock UI after token sends and burns
ClosedPublic

Authored by bytesofman on Nov 29 2022, 08:10.

Details

Summary

T2819

Use changes to user's XEC balance to unlock the UI on the SendToken screen, instead of changes to the individual token balance.

The goal here is to keep the UI locked until the utxo set has updated to reflect the latest set in the wallet. If the balance has changed, this has happened (even if the balance change is from something unrelated, like a received XEC transaction).

The current way of handling this will fail if a user sends an eToken to their own address, as their own balance of that eToken will not change (causing the UI to remain locked indefinitely).

Test Plan

npm start
Send a token tx to another wallet and observe UI unlocks when utxo set has updated
Send a token tx to yourself and observe UI unlocks after utxo set has updated
Burn some of an eToken and observe UI unlocks after utxo set has updated
Burn all of an eToken and observe UI unlocks after utxo set has updated

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable