From 9a19494c84c332fee9fbf9fd9e1d9843bc60ceb2 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Wed, 27 Sep 2023 14:27:44 +0200 Subject: [PATCH] fix: prevent vault to be exposed to UI --- app/scripts/metamask-controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 7dfb9b5286e9..01ed208727b0 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -2286,6 +2286,9 @@ export default class MetamaskController extends EventEmitter { const flatState = this.memStore.getFlatState(); + // The vault should not be exposed to the UI + delete flatState.KeyringController.vault; + return { isInitialized, ...flatState,