1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/app/scripts
Mark Stacey ddeaeb5ba5 Fix Sentry breadcrumb collection during initialization (again) (#20532)
Sentry breadcrumb collection during initialization was broken in #20529
because we failed to consider that the `getSentryState` check was also
used for an opt-in check in the `beforeBreadcrumb` hook.

I had assumed that `getSentryState` was only used to get state to add
additional context to an error report. But the function has a second
purpose: to get state for the purposes of checking whether the user has
opted into MetaMetrics. In this second case, `mostRecentRetrievedState`
is sometimes unset (which violates an assumption made in #20529)

The `getMostRecentPersistedState` hook removed in #20529 has been
restored, ensuring that the `getSentryState` function returns Sentry
state after loading state for the first time, but before the first
error has occurred.

This mistake didn't cause e2e tests to fail because multiple errors are
currently thrown in the background upon initialization on `develop`
(relating to Snow scuttling). These errors were early enough that they
happened before the console logs that our breadcrumb test was testing
for. When #20529 was ported onto the v10.34.5 RC, these errors were not
present so the test failed correctly.
2023-08-18 18:26:50 -02:30
..
account-import-strategies Upgrading the Import Account modal (#17763) 2023-03-06 09:48:28 -08:00
constants Convert app/scripts/constants -> Typescript (#17327) 2023-01-20 13:33:01 -07:00
controllers Capture app and migration version (#20458) 2023-08-16 14:47:01 -02:30
lib Fix Sentry breadcrumb collection during initialization (again) (#20532) 2023-08-18 18:26:50 -02:30
migrations Remove invalid tokensChainsCache state (#20495) 2023-08-17 14:23:54 -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 Fix Sentry breadcrumb collection during initialization (again) (#20532) 2023-08-18 18:26:50 -02:30
contentscript.js Reset extensions streams on chromium prerender workaround (#19727) 2023-06-27 09:10:04 -07:00
detect-multiple-instances.js Warn about multiple MetaMask instances running (#13836) 2022-04-27 20:14:10 +02:00
detect-multiple-instances.test.js [MMI] Prevent multiple instances of MM at the same browser (#17856) 2023-03-02 10:17:45 -06:00
disable-console.js Disable warn logs in content-script (#19754) 2023-06-26 14:00:38 +03:00
first-time-state.js Migrate network configurations (previously frequentRpcListDetail) from PreferencesController to NetworkController (#17421) 2023-03-09 15:00:28 -06:00
init-globals.js MV3: fix injection of applyLavamoat variable in service worker (#14920) 2022-06-18 12:40:30 +05:30
inpage.js MV3: contentscript.js - re-activate streams when Service Worker terminates and then resets (#15494) 2022-09-13 14:20:08 -07:00
lockdown-more.js Bump SES to fix audit failure (#20434) 2023-08-16 22:51:49 -02:30
lockdown-run.js update ses@0.18.4 (#17521) 2023-04-27 21:31:52 +09:00
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 [MMI] adds mmi code fences to mm controller (#18279) 2023-05-29 16:38:28 +01:00
sentry-install.js refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
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 Fix pre-initialization UI error state capture (#20529) 2023-08-18 16:35:03 -02:30
use-snow.js fix: skip snow usage for MV3 test build (#19827) 2023-06-30 13:22:07 +01:00