Page MenuHomePhabricator

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

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

Details

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

Diff Detail

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