1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Mark Stacey 80746e67b5 Improve Sentry state pre-initialization (#20491)
* Improve Sentry state pre-initialization

Previously the masked state snapshot sent to Sentry would be blank for
errors that occured during initialization. Instead we'll now include
some basic information in all cases, and a masked copy of the persisted
state if it happens after the first time the persisted state is read.

* Add test

* Fix crash when persisted state not yet fetched

* Add descriptions for initial state hooks

* Update comments to reflect recent changes

* Re-order imports to follow conventions

* Move initial state hooks back to module-level

The initial state hooks are now setup at the top-level of their module.
This ensures that they're setup prior to later imports. Calling a
function to setup these hooks in the entrypoint module wouldn't
accomplish this even if it was run "before" the imports because ES6
imports always get hoisted to the top of the file.

The `localStore` instance wasn't available statically, so a new state
hook was introduced for retrieving the most recent retrieved persisted
state.

* Fix error e2e tests
2023-08-17 14:22:31 -02:30
..
account-import-strategies
constants
controllers Capture app and migration version (#20458) 2023-08-16 14:47:01 -02:30
lib Improve Sentry state pre-initialization (#20491) 2023-08-17 14:22:31 -02:30
migrations Capture exception with sentry when invariant conditions are met in migrations (#20427) 2023-08-17 09:01:05 -02:30
platforms Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00
app-init.js fix: skip snow usage for MV3 test build (#19827) 2023-06-30 13:22:07 +01:00
background.js Improve Sentry state pre-initialization (#20491) 2023-08-17 14:22:31 -02:30
contentscript.js Reset extensions streams on chromium prerender workaround (#19727) 2023-06-27 09:10:04 -07:00
detect-multiple-instances.js
detect-multiple-instances.test.js
disable-console.js Disable warn logs in content-script (#19754) 2023-06-26 14:00:38 +03:00
first-time-state.js
init-globals.js
inpage.js
lockdown-more.js Bump SES to fix audit failure (#20434) 2023-08-16 22:51:49 -02:30
lockdown-run.js
metamask-controller.actions.test.js Update @metamask/phishing-controller to v4.0.0 (#18840) 2023-07-31 17:55:48 -02:30
metamask-controller.js Capture app and migration version (#20458) 2023-08-16 14:47:01 -02:30
metamask-controller.test.js Remove fallback phishing warning configuration (#20327) 2023-08-01 00:17:07 -02:30
mmi-keyring-builder-factory.js
sentry-install.js
translate.test.ts Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00
translate.ts Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00
ui.js Improve Sentry state pre-initialization (#20491) 2023-08-17 14:22:31 -02:30
use-snow.js fix: skip snow usage for MV3 test build (#19827) 2023-06-30 13:22:07 +01:00