HomePhabricator

[Cashtab] Remove obsolete chain of functions handling initial wallet load

Description

[Cashtab] Remove obsolete chain of functions handling initial wallet load

Summary:
Set the wallet in localStorage as the valid wallet immediately on startup.

The getWallet function already handles validation and potential migration requirements. With chronik, we can always refresh the wallet state on startup -- since this does not cause a noticeable user lag (legacy bch-api + slpdb approach could take 20s).

Test Plan:
npm test

The new tests in useWalletStorage.test.js still pass after the changes in this diff, showing that we are correctly loading a wallet from storage on startup and immediately calling the update routine.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
bytesofmanAuthored on Jan 30 2024, 04:22
bytesofmanPushed on Feb 2 2024, 12:46
Reviewer
Restricted Project
Differential Revision
D15322: [Cashtab] Remove obsolete chain of functions handling initial wallet load
Parents
rABCe250296d6172: Bump version to 0.28.9
Branches
Unknown
Tags
Unknown