[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