fix: cp-7.57.0 app bricks on asset sorting#21256
Merged
Merged
Conversation
|
bergarces
reviewed
Oct 16, 2025
| } | ||
|
|
||
| if (bValue === undefined) { | ||
| if (bValue == null) { |
Contributor
There was a problem hiding this comment.
This will stop it from crashing if it's null, but make it crash if it's undefined. We probably should check both just to be safe.
if (bValue === undefined || bValue === null)
Member
Author
There was a problem hiding this comment.
Nope, x == null is a shortcut to x === null || x === undefined 🚀
Member
Author
There was a problem hiding this comment.
You taught me this yesterday ??= and I show you this today! 😄
bergarces
approved these changes
Oct 16, 2025
Collaborator
|
Missing release label release-7.57.0 on PR. Adding release label release-7.57.0 on PR and removing other release labels(release-7.58.0), as PR was cherry-picked in branch 7.57.0. |
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
From the Home token list, if the user sets a sort/filter such as Descending by balance, the app crashes to the generic error screen on next render and becomes unrecoverable. Force-quitting and relaunching does not help; only uninstall + reinstall clears the state. The crash message indicates the Wallet view throws on
localeCompareofnull.Changelog
CHANGELOG entry:
Related issues
Fixes: #21218
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Update
sortAssetsto move nullish values to the end during sorting and add tests for null handling in alphaNumeric asc/desc cases.app/components/UI/Tokens/util/sortAssets.tsto treatnulllikeundefined(aValue == null/bValue == null) so nullish values are always placed at the end regardless of order.app/components/UI/Tokens/util/sortAssets.test.tsto verify alphaNumeric sorting withnullnames in both ascending and descending orders.Written by Cursor Bugbot for commit 420abbc. This will update automatically on new commits. Configure here.