Skip to content

Commit

Permalink
Merge branch 'develop' into feature/unauthorize-dapp
Browse files Browse the repository at this point in the history
  • Loading branch information
gergold committed Mar 9, 2022
2 parents 874451f + a1ac0df commit 112eae9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension/src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ import { Wallet, WalletStorageProps } from "./wallet"

case "RESET_ALL": {
clearStorage()
return wallet.lock()
return wallet.reset()
}

case "PREAUTHORIZE": {
Expand Down
6 changes: 6 additions & 0 deletions packages/extension/src/background/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ export class Wallet extends EventEmitter {
this.session = undefined
}

public reset() {
this.accounts = []
this.encryptedBackup = undefined
this.session = undefined
}

public async importBackup(backupString: string) {
if (!Wallet.validateBackup(backupString)) {
if (Wallet.isLegacyBackup(backupString)) {
Expand Down

0 comments on commit 112eae9

Please sign in to comment.