Push and pull the data structures for known addresses/UTXO's to local storage, so as to pick up where we left off when doing address discovery, as opposed to re-executing all fetches each time.
This can be relatively naive, and not fully optimized, but one thing we want to make sure we avoid is displaying the txs for the wrong wallet, i.e. if the user creates a new wallet or restores an old one. It might make sense to tie some kind of unique identifier to they key as a defensive measure, such that even if we fail to clear the cached data, we'd never pull in txs of the wrong wallet.
Off the top of my head, one method might be to take the hash of the encrypted file and use that as part of the local storage key for the cached data. Does this make any sense?
Push and pull the data structures for known addresses/UTXO's to local storage, so as to pick up where we left off when doing address discovery, as opposed to re-executing all fetches each time.
This can be relatively naive, and not fully optimized, but one thing we want to make sure we avoid is displaying the txs for the wrong wallet, i.e. if the user creates a new wallet or restores an old one. It might make sense to tie some kind of unique identifier to they key as a defensive measure, such that even if we fail to clear the cached data, we'd never pull in txs of the wrong wallet.
Off the top of my head, one method might be to take the hash of the encrypted file and use that as part of the local storage key for the cached data. Does this make any sense?