HomePhabricator

[Cashtab] Patch error when activating saved wallet for first time

Description

[Cashtab] Patch error when activating saved wallet for first time

Summary:
T2824

Cashtab wallets are created into savedWallets without a state key, as this is created and populated in update. However, update is only called on active wallets. When a wallet is first activated, it is running through loadStoredWallet, which expects a defined state.

This function allows loadStoredWallet to handle undefined as an input.

Test Plan:
npm test
npm start
create a new wallet
activate it
note no error msgs in dev console
activate a stored wallet that already has state
note no error msgs in dev console
Confirm you can use the wallet

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

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

Details

Provenance
bytesofmanAuthored on Dec 4 2022, 04:58
bytesofmanPushed on Dec 4 2022, 14:00
Reviewer
Restricted Project
Differential Revision
D12745: [Cashtab] Patch error when activating saved wallet for first time
Parents
rABC90f7575ec6a7: [Chronik] Add `ChronikPort` to `CBaseChainParams`, use RPC-1 as port
Branches
Unknown
Tags
Unknown