Skip to content

Commit

Permalink
Merge branch 'feat/unencrypted' into tmp/20250103
Browse files Browse the repository at this point in the history
  • Loading branch information
jinming0618 committed Jan 2, 2025
2 parents a20ce55 + bf1535f commit d365951
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,20 @@ restoreAppState();
);
}

keyringService.on('resetPassword', async () => {
const gasAccount = gasAccountService.getGasAccountData() as GasAccountServiceStore;

if (
gasAccount?.account?.type === KEYRING_TYPE.SimpleKeyring ||
gasAccount?.account?.type === KEYRING_TYPE.HdKeyring
) {
gasAccountService.setGasAccountSig();
eventBus.emit(EVENTS.broadcastToUI, {
method: EVENTS.GAS_ACCOUNT.LOG_OUT,
});
}
});

// for page provider
browser.runtime.onConnect.addListener((port) => {
if (
Expand Down
1 change: 1 addition & 0 deletions src/background/service/keyring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ export class KeyringService extends EventEmitter {

this.store.updateState({ vault, booted, hasEncryptedKeyringData: false });

this.emit('resetPassword');
// lock wallet
this.setLocked();
}
Expand Down

0 comments on commit d365951

Please sign in to comment.