oasisprotocol / wallet

Official non-custodial wallet for the Oasis Network.
https://wallet.oasis.io
Apache License 2.0
111 stars 42 forks source link

Persist state #792

Open lukaw3d opened 2 years ago

lukaw3d commented 2 years ago

Add an option to keep imported accounts in password-encrypted localStorage

Currently user loses all state on reload.

Make sure stored information is also migrate-able from existing extension https://github.com/oasisprotocol/oasis-wallet-ext/blob/e6998cff910449fd0f33fc998d9c5e306d59aa99/src/background/service/APIService.js#L177-L189

lukaw3d commented 2 years ago

Proof of concept https://github.com/oasisprotocol/wallet-poc/pull/1

lukaw3d commented 2 years ago

Main issues with proof of concept - storing and syncing whole redux state:

lukaw3d commented 2 years ago

Instead of persisting and syncing everything, we should be more selective.

Current state, by longterm-ness

We definitely need to store: theme, network (partially), wallet, selected account, dapp (soon) and we definitely shouldn't store and sync: fatalError.

More considerations:

Defer/ignore:

So

nomnoml

nomnoml diagram source

lukaw3d commented 1 year ago

Updated

nomnoml

nomnoml diagram source

lukaw3d commented 1 year ago

Deferred out of https://github.com/oasisprotocol/oasis-wallet-web/pull/975

Extension: