HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Differential Revision: https://reviews.bitcoinabc.org/D12688

Details

Provenance
bytesofmanAuthored on Nov 29 2022, 08:07
bytesofmanPushed on Nov 29 2022, 10:12
Reviewer
Restricted Project
Differential Revision
D12688: [Cashtab] Use XEC balance change to unock UI after token sends and burns
Parents
rABC0c289b211a6d: bitcoin-cli: Correct docs (no "generatenewaddress" exists)
Branches
Unknown
Tags
Unknown