From d9a4c60d998af7c71ec9344dbecb8e45ca03a9df Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Sat, 13 Jun 2020 18:42:39 -0700 Subject: [PATCH] Clear permssions during createNewVaultAndRestore (#8804) One possible solution to #8787. --- app/scripts/metamask-controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 5c36d8d23..1ec0ac43d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -620,6 +620,10 @@ export default class MetamaskController extends EventEmitter { // clear known identities this.preferencesController.setAddresses([]) + + // clear permissions + this.permissionsController.clearPermissions() + // create new vault const vault = await keyringController.createNewVaultAndRestore(password, seed)