fix: Add migration 120.4 to delete obsolete currency controller state#26383
Merged
fix: Add migration 120.4 to delete obsolete currency controller state#26383
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Gudahtt
reviewed
Aug 13, 2024
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
danjm
commented
Aug 13, 2024
|
digiwand
approved these changes
Aug 13, 2024
Collaborator
Builds ready [03f30c3]
Page Load Metrics (418 ± 345 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
We are seeing the following sorts of errors in production, as reported by sentry, in v12.0.2:
No metadata found for 'conversionDate'No metadata found for 'usdConversionRate'No metadata found for 'nativeCurrency'No metadata found for 'conversionRate'Example issue: https://metamask.sentry.io/issues/5682684113/events/b8006eebb65749f883e907242e52215b/?project=273505&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+No+metadata+release%3A12.0.1&referrer=previous-event&statsPeriod=14d&stream_index=1
The
CurrencyRateControllerstopped using six such properties with MetaMask/core#1805, which was brought into the extension with #21549, however, there was not a state migration to delete those properties at the timeThis PR adds migrations to delete those obsolete properties
Related issues
Fixes: #26356
Manual testing steps
To observe the error using steps that mimic users in production
masterbranchIf you repeat those steps, but in step two build from this branch instead of the
masterbranch, the errors will not occurFor a faster manual test of this PR, create a local development build of this branch and then run this script in the service worker console:
There should be no errors like
No metadata found for 'conversionRate'(but if you do the same on develop or master, those errors should be present)Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist