HomePhabricator

[Cashtab] [wallet mgmt improvements p4] Add UI locking to useWallet.js…

Description

[Cashtab] [wallet mgmt improvements p4] Add UI locking to useWallet.js functions that change local storage

Summary:
T2822

Depends on D12843

Add UI locking by setting the loading state variable in useWallet.js to true when a function that impacts local storage is called. Unlock the UI after these functions complete, i.e. before every return statement in the function.

Test Plan:
npm start
Go to settings page
Add a new wallet and check dev console for UI lock and unlock statements
Delete a wallet and check dev console for UI lock and unlock statements
Rename a wallet and check dev console for UI lock and unlock statements
Rename a saved wallet to an already taken name and check dev console for UI lock and unlock statements
Rename the active wallet to an already taken name and check dev console for UI lock and unlock statements
Add a contact and check the dev console for UI lock and unlock statements

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Dec 10 2022, 18:23
bytesofmanPushed on Dec 11 2022, 05:51
Reviewer
Restricted Project
Differential Revision
D12844: [Cashtab] [wallet mgmt improvements p4] Add UI locking to useWallet.js functions that change local storage
Parents
rABC6751af1c5cfc: [Cashtab] [wallet mgmt improvements p3] Get all wallet context variables in the…
Branches
Unknown
Tags
Unknown