-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix invalid state causing migration 88 to fail #26397
Conversation
We have found evidence that migration 88 is failing for some users due to a `null` key in the `TokensController.allTokens` state. The migration has been updated to delete any invalid `null`-keys prior to migrating it, preventing the error. Fixes #25938
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strongly recommend using "Hide whitespace" to view this diff, it's only 38 lines with that enabled.
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26397 +/- ##
===========================================
+ Coverage 70.13% 70.14% +0.01%
===========================================
Files 1435 1435
Lines 50309 50327 +18
Branches 13897 13915 +18
===========================================
+ Hits 35283 35301 +18
Misses 15026 15026 ☔ View full report in Codecov by Sentry. |
Builds ready [47a2415]
Page Load Metrics (66 ± 7 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
if (chainId === 'undefined' || chainId === undefined) { | ||
if ( | ||
chainId === 'undefined' || | ||
chainId === undefined || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure Object.keys
would always return undefined
as a string literal, do we shouldn't need this condition. But it was already there, so I left it to minimize changes.
I confirmed that using null
here didn't work, I needed to check for the string 'null'
.
Description
We have found evidence that migration 88 is failing for some users due to a
null
key in theTokensController.allTokens
state. The migration has been updated to delete any invalidnull
-keys prior to migrating it, preventing the error.Related issues
Fixes #25938
Manual testing steps
The unit tests demonstrate the affected scenario fairly well. We addressed the "null key" case for a variety of different parts of state, but specifically the one we are seeing in prod is the
allTokens
state having anull
key.Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist