[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