1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui
Dan J Miller ca1ddeb59b
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:15:45 -02:30
..
__mocks__ Refactoring isManifestV3 variable (#15568) 2022-08-16 20:51:42 +05:30
components Security Alert Blockaid: fix propType and add instance to ConfirmApprove page (#20494) 2023-08-18 14:06:46 +02:00
contexts Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00
css Update critical error styles (#20350) 2023-08-03 00:23:00 +02:00
ducks Fix #19829: UX: Multichain: Move "Import Tokens" to Modal (#19553) 2023-08-14 11:08:59 -05:00
helpers Add Opt-out Settings toggle for 4byte contract method names resolution (#20098) 2023-08-04 13:28:37 -04:00
hooks fix: remove unused useMethodData code (#20146) 2023-07-25 10:49:45 +01:00
pages [MMI] Set approved status in tx controller in MMI logic (#20507) 2023-08-18 14:38:51 +02:00
selectors [MMI] Fixed connect mmi button several issues (#20455) 2023-08-17 14:50:40 +02:00
store Add additional Sentry E2E tests (#20425) 2023-08-16 11:52:25 -02:30
index.js Fix and test log.info calls run for each migration (#20517) 2023-08-18 11:15:45 -02:30
index.test.js Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00