[Cashtab] [wallet mgmt improvements p5] activateWallet takes currently active wallet as a param
Summary:
T2822
Depends on D12844
The activateWallet function in useWallet.js currently determines the active wallet by getting it from local storage within the function. However, due to the async nature of state variables and local storage, this value should be a parameter. That way it will match the corresponding value of walletToActivate at the time the function was called.
Test Plan:
npm start
Change the active wallet
Confirm updateSavedWalletsOnLoad called with the right params in the dev console
Change back to your previous wallet
Confirm same thing in dev console
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D12846