Fix: Duplicate TRON rows in Earn tab (#32110)#32130
Open
Abhigyan-git09 wants to merge 2 commits into
Open
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. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes #32110. The Earn deposit token picker previously showed duplicate TRON rows with blank names. This was caused by the multichain assets controller emitting TRON special assets (or tokens missing metadata) without a symbol or name. Since
isTronSpecialAssetchecked the symbol, it failed to filter them out when the symbol was missing, andselectEarnTokenssubsequently treated each one as a native TRON staking token.This PR:
isTronSpecialAssetto correctly filter out Tron tokens missing a symbol.selectEarnTokensto completely ignore tokens across all chains that lack both a symbol and a name.Changelog
CHANGELOG entry: Fixed a bug in the Earn deposit token list where duplicate blank TRON rows were displayed due to unparsed multichain assets.
Related issues
Fixes #32110
Pre-merge author checklist
Note
Low Risk
Display and token-list filtering only; no auth, payments, or persistence changes. Slight risk that legitimately unnamed tokens on any chain are excluded from Earn.
Overview
Fixes duplicate blank TRON rows in the Earn deposit token list when multichain assets arrive without metadata.
isTronSpecialAssetnow treats Tron-chain tokens with a missing or empty symbol as special assets (filtered like energy/bandwidth), instead of letting them pass through whensymbolwas falsy.selectEarnTokensadditionally drops tokens across all chains that lack bothsymbolandnamebefore building earn token lists.Unit tests cover the updated
isTronSpecialAssetbehavior.Reviewed by Cursor Bugbot for commit c0b877d. Bugbot is set up for automated code reviews on this repo. Configure here.