From fc232da4c4bc3f7d31c5e886ff2f9ad0d1d73a51 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 18 Aug 2022 15:25:28 -0230 Subject: [PATCH] Fix state creation in setupSentryGetStateGlobal (#15635) --- app/scripts/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index 6267c4441..0f44e0768 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -360,7 +360,7 @@ function setupController(initState, initLangCode, remoteSourcePort) { }, ); - setupSentryGetStateGlobal(controller.store); + setupSentryGetStateGlobal(controller); /** * Assigns the given state to the versioned object (with metadata), and returns that. @@ -788,11 +788,11 @@ browser.runtime.onInstalled.addListener(({ reason }) => { function setupSentryGetStateGlobal(store) { global.getSentryState = function () { const fullState = store.getState(); - const debugState = maskObject(fullState, SENTRY_STATE); + const debugState = maskObject({ metamask: fullState }, SENTRY_STATE); return { browser: window.navigator.userAgent, store: debugState, - version: global.platform.getVersion(), + version: platform.getVersion(), }; }; }