Page MenuHomePhabricator

[Cashtab] [wallet mgmt improvements p1] Add UI locking to settings page
ClosedPublic

Authored by bytesofman on Dec 10 2022, 18:00.

Details

Summary

T2822

The UI of Configure.js should be locked while async operations that impact wallet data are performed. This diff uses the same approach implemented in Send.js and SendToken.js for locking the UI until the utxo set refreshes. In this case, it is applied to lock the UI until savedWallet state variable has updated.

Test Plan

npm start
Navigate to settings page
Activate a different wallet
In the dev console, note msg savedWallets from useEffect in Configure.js updated, unlocking UI
Test for the same in the extension by building it locally

Diff Detail

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

Event Timeline

emack requested changes to this revision.Dec 11 2022, 03:01
emack added a subscriber: emack.

the 0.5 second flash of the loading status every 10 seconds is epilepsy inducing... are there any ways around this? e.g. since it flashes for such a tiny fraction of a second can we make it transparent? Otherwise it looks like there's an infinite loop bobbing about in the backend.

This revision now requires changes to proceed.Dec 11 2022, 03:01

the 0.5 second flash of the loading status every 10 seconds is epilepsy inducing... are there any ways around this? e.g. since it flashes for such a tiny fraction of a second can we make it transparent? Otherwise it looks like there's an infinite loop bobbing about in the backend.

This is corrected later in the stack, where you only get this change on wallet changes or actions and not on update loops

yup just noticed the correction later on in the stack, all good

This revision is now accepted and ready to land.Dec 11 2022, 03:44