HomePhabricator

[Cashtab] [wallet mgmt improvements p2] Only update wallet when user has…

Description

[Cashtab] [wallet mgmt improvements p2] Only update wallet when user has changed wallets

Summary:
T2822

Depends on D12841

The settings page needs to update the savedWallets data in state whenever the user has changed wallets. Since all wallets have unique names, wallet.name is the right param to monitor for changes. If you just use wallet, this loop also runs every time the update function in useWallet.js runs.

Test Plan:
npm start
Monitor the dev log for a couple of minutes to ensure that update has run several times
Note the msg User has changed the active wallet in Configure.js only appears when you change active wallets

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

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

Details

Provenance
bytesofmanAuthored on Dec 10 2022, 18:05
bytesofmanPushed on Dec 11 2022, 05:51
Reviewer
Restricted Project
Differential Revision
D12842: [Cashtab] [wallet mgmt improvements p2] Only update wallet when user has changed wallets
Parents
rABC5a0745872eb0: [Cashtab] [wallet mgmt improvements p1] Add UI locking to settings page
Branches
Unknown
Tags
Unknown