* Capture Sentry errors prior to initialization
Sentry errors captured before/during the wallet initialization are
currently not captured because we don't have the controller state yet
to determine whether the user has consented.
The Sentry setup has been updated to check the persisted state for
whether the user has consented, as a fallback in case the controller
state hasn't been initialized yet. This ensures that we capture errors
during initialization if the user has opted in.
* Always await async check for whether the user has opted in
* Remove unused import
* Update JSDoc return type
* Remove unused driver method
* Fix metametrics controller unit tests
* Fix e2e tests
* Fix e2e test on Firefox
* Start session upon install rather than toggle
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Handle the case where tokensChainsCache data is undefined in migration 77
* Delete parts of state that should have been removed in migrations 82,84,86 and 88
* Create 077-supplements.md
* Update 077-supplements.md
* Update 077-supplements/*.js code comments
* Fix types and jsdoc
* Type/lint fix
* Cleanup
* Add 'should set data to an empty object if it is null' test case to 077.test.js
* Update app/scripts/migrations/077.test.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Modify deletion criteria so that all decimal chain id proprties are deleted in migration 88 supplement
* Readme.md
* Update app/scripts/migrations/077.test.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Update app/scripts/migrations/077.test.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Update app/scripts/migrations/077.test.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Lint fix
* Only delete decimal chain id keyed-entries in migration 88 supplement if there are hexadecimal keyed entries as well
* Remove redundant test
* Add 'does not delete' cases for nftcontroller related tests in 077.test.js
---------
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Update phishing controller to v4.0.0
* Move phishing e2e test utilities into its own helper.js
* Update phishing detection e2e test
* Update MetaMask Controller test mocks
* Update mv3 phishing tests
* Fix test for 500 error on warning page
* Allow for directories in test folder
* Update migration number
* Linting fixes
* Remove fail on console error
* Separate mocks from helpers
* Have migration delete PhishingController state entirely
* Remove phishing detection directory
* Only delete the listState in migration
* Bump migration version
* Add improved downloading logic when exporting state logs
* Make test for state logs download only apply to firefox
* Remove eslint override
* Add file extension to test
* Move make jest global.Blob accessible to window
* Migration 89: ensure providerConfig in state has an id property
* Exit transformState function early if providerConfig already has an id
* Update migrations/index.js
* Code cleanup
* Update sentry/cli to 2.19.4
* Ensure sentry files are loaded and referenced with a valid url
* Temp to eliminate errors in sentry (should be split into other PRs)
* Fix invalid state persistence error
We have been seeing Sentry errors showing that state persistence has
been failing for some users that have invalid `NetworkController`
state. This has been fixed by updating to
`@metamask/base-controller@v3.2.0`, which is more tolerant of
unexpected state properties.
* Update LavaMoat policies
---------
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
When the NetworkController in this repo was replaced with
`@metamask/network-controller`, support for Linea networks was lost
as it did not support it at that time. `@metamask/network-controller`
has since been updated, so this commit bumps that package to restore
support.
Two new security advisories have been resolved. These advisories are
causing CI to fail on `develop`. Neither presents any risk to us,
as they are prototype pollution issues that are prevented by lockdown.
The first advisory isn't easy for us to patch. It's caused by an
outdated version of `protobufjs` used by `@trezor/transport`. It has
been ignored for now, until Trezor updates that package.
For the second advisory (related to `tough-cookie`), it was resolved
by updating that dependency in our lockfile.
In the new version of NetworkController, it will now precreate network
clients for built-in and custom networks and expose those network
clients for consumers. This furthers the multichain UX project by making
it possible for MetaMask to interface with multiple networks
simultaneously.
This commit also upgrades `@metamask/gas-fee-controller` to prevent a
peer dependency warning from showing up as well as
`@metamask/controller-utils` in order to reduce the dependency tree.
There are no user-facing changes to either package.
* Prevent controller events from crashing
The package `@metamask/base-controller` has been updated to v3.1, which
includes a change to how event subscriber errors are handled. Errors
thrown in event subscribers will no longer interrupt event publishing.
Subscriber errors are caught and thrown in a timeout handler, ensuring
that they are logged and captured by Sentry. We can find any subscriber
errors by looking at the background console, or at the Sentry
dashboard.
Fixes#19801
* Update LavaMoat policies
---------
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
* feat: adds linea mainnet support in anticipation of July 11 launch
* chore: fixes linting issue
* chore: adds comma for linting
---------
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>