Page MenuHomePhabricator

[Cashtab] [wallet mgmt improvements p5] activateWallet takes currently active wallet as a param
ClosedPublic

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

Details

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

Diff Detail

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