1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 20:02:58 +01:00
metamask-extension/app/scripts
Dan J Miller c2163434db Fix and test log.info calls run for each migration (#20517)
* Fix and test log.info calls run for each migration

In migrator/index.js, log.info is called before an after each migration.
These calls are intended to produce breadcrumbs to be captured by sentry
in cases where errors happen during or shortly after migrations are run.
These calls were not causing any output to the console because the log.setLevel
calls in ui/index.js were setting a 'warn value in local storage that was being
used by logLevel in the background.

This commit fixes the problem by setting the `persist` param of setLevel to
false, so that the background no longer reads the ui's log level.

Tests are added to verify that these logs are captured in sentry breadcrumbs
when there is a migration error due to an invariant state.

* Improve breadcrumb message matching

The test modified in this commit asserts eqaulity of  messages from breadcrumbs
and hard coded expected results. This could cause failures, as sometimes the
messages contain whitespace characters. This commit ensures the assertions only
check that the expected string is within the message string, ignoring extra
characters.
2023-08-18 11:16:42 -02:30
..
account-import-strategies
constants
controllers Capture app and migration version (#20458) 2023-08-16 14:47:01 -02:30
lib Initialize composable observable store after update (#20468) 2023-08-18 11:16:17 -02:30
migrations Remove invalid tokensChainsCache state (#20495) 2023-08-17 14:23:54 -02:30
platforms
app-init.js
background.js Fix and test log.info calls run for each migration (#20517) 2023-08-18 11:16:42 -02:30
contentscript.js
detect-multiple-instances.js
detect-multiple-instances.test.js
disable-console.js
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
metamask-controller.js Capture app and migration version (#20458) 2023-08-16 14:47:01 -02:30
metamask-controller.test.js
mmi-keyring-builder-factory.js
sentry-install.js
translate.test.ts
translate.ts
ui.js Improve Sentry state pre-initialization (#20491) 2023-08-17 14:22:31 -02:30
use-snow.js