Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3702,12 +3702,18 @@ export default class MetamaskController extends EventEmitter {
}

async resetWallet() {
// sign out from Authentication service and clear the Session Data
this.authenticationController.performSignOut();

// clear SeedlessOnboardingController state
this.seedlessOnboardingController.clearState();

// reset onboarding state
this.onboardingController.resetOnboarding();

// stop subscription polling
this.subscriptionController.stopAllPolling();

this.appStateController.setIsWalletResetInProgress(true);
}

Expand Down Expand Up @@ -8585,6 +8591,9 @@ export default class MetamaskController extends EventEmitter {

// stop polling for the subscriptions when the wallet is locked manually and window/side-panel is still open
this.subscriptionController.stopAllPolling();

// sign out from Authentication service and clear the Session Data
this.authenticationController.performSignOut();
} catch (error) {
log.error('Error setting locked state', error);
throw error;
Expand Down
Loading