1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Fix state creation in setupSentryGetStateGlobal (#15635)

This commit is contained in:
Dan J Miller 2022-08-18 15:25:28 -02:30 committed by GitHub
parent d25f9cf4da
commit fc232da4c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(),
};
};
}