1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib
Mark Stacey 885a8ce256
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:27 -02:30
..
ens-ipfs Allow user to turn off ENS DNS resolution (#20102) 2023-07-28 11:21:43 -05:00
middleware
migrator Log before and after each migration run (#20424) 2023-08-15 19:19:48 -02:30
ppom Fix import that was resulting in a depcheck error (#20383) 2023-08-03 12:26:05 -02:30
rpc-method-middleware Ensure chainId comparison in switchEthereumChain handler is case insensitive (#20149) 2023-07-24 16:34:51 -02:30
segment
account-tracker.js
account-tracker.test.js
backup.js Rename BackupController to Backup (#20465) 2023-08-16 16:59:17 -02:30
backup.test.js Rename BackupController to Backup (#20465) 2023-08-16 16:59:17 -02:30
cleanErrorStack.js
cleanErrorStack.test.js
ComposableObservableStore.js Initialize composable observable store after update (#20468) 2023-08-17 12:22:37 -02:30
ComposableObservableStore.test.js Initialize composable observable store after update (#20468) 2023-08-17 12:22:37 -02:30
createDupeReqFilterMiddleware.js
createDupeReqFilterMiddleware.test.js
createLoggerMiddleware.js
createMetamaskMiddleware.js
createMetaRPCHandler.js
createMetaRPCHandler.test.js
createOnboardingMiddleware.js
createOriginMiddleware.js
createRPCMethodTrackingMiddleware.js
createRPCMethodTrackingMiddleware.test.js
createStreamSink.js
createTabIdMiddleware.js
extractEthjsErrorMessage.js
get-first-preferred-lang-code.js
getObjStructure.js
local-store.js Improve Sentry state pre-initialization (#20491) 2023-08-17 09:29:05 -02:30
local-store.test.js Improve Sentry state pre-initialization (#20491) 2023-08-17 09:29:05 -02:30
metaRPCClientFactory.js
metaRPCClientFactory.test.js
network-store.js Fix pre-initialization UI error state capture (#20529) 2023-08-18 16:32:28 -02:30
notification-manager.js
notification-manager.test.ts
security-provider-helpers.test.ts
security-provider-helpers.ts
seed-phrase-verifier.js
seed-phrase-verifier.test.js
sentry-filter-events.ts Capture Sentry errors prior to initialization (#20265) 2023-07-31 18:49:32 -02:30
setup-initial-state-hooks.js Fix Sentry breadcrumb collection during initialization (again) (#20532) 2023-08-18 18:26:27 -02:30
setupSentry.js Fix Sentry breadcrumbs collection during initialization (#20521) 2023-08-18 05:47:23 -02:30
setupSentry.test.js
stream-utils.js
util.test.js
util.ts