HomePhabricator

[Cashtab] [wallet mgmt improvements p7] Do not set renamed active wallet in…

Description

[Cashtab] [wallet mgmt improvements p7] Do not set renamed active wallet in state unless storage update succeeded

Summary:
T2822

Depends on D12847

Pretty sure this is the 'root cause' of the bug, though the diffs earlier on this stack implement better dev practices.

This diff ensures that we do not set a renamed active wallet in state as wallet unless it has also updated in indexedDb.

Test Plan:
npm start
Create 3 or 4 wallets
Rapidly switch between them
Every once in awhile, rename the active wallet, or a saved wallet
Confirm that you never see the initial bug (savedWallets does not add an extra renamed activeWallet)

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Dec 10 2022, 18:45
bytesofmanPushed on Dec 11 2022, 05:51
Reviewer
Restricted Project
Differential Revision
D12848: [Cashtab] [wallet mgmt improvements p7] Do not set renamed active wallet in state unless storage update succeeded
Parents
rABC33cd5c3590a4: [Cashtab] [wallet mgmt improvements p6] Rename wallet param to activeWallet in…
Branches
Unknown
Tags
Unknown