Skip to content

Commit 76dd706

Browse files
committed
fix: clear all storage on new wallet
1 parent 2953066 commit 76dd706

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sagas/wallet.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ export function* startWallet(action) {
162162
// but the wallet may be closed unexpectedly
163163
const storage = STORE.getStorage();
164164
yield call([storage.store, storage.store.cleanMetadata]); // clean metadata on memory
165-
yield call([storage, storage.cleanStorage], true); // clean transaction history
165+
// clean transaction history, addresses, token and nano-contract indexes
166+
// XXX: It would be better to keep registered tokens and nano contracts
167+
// if the network has same genesis
168+
yield call([storage, storage.cleanStorage], true, true, true);
166169

167170
// As this is a core setting for the wallet, it should be loaded first.
168171
// Network settings either from store or redux state

0 commit comments

Comments
 (0)