chore: Earn deposit token list shows duplicate blank TRON rows with repeated APR (#32110)#32111
chore: Earn deposit token list shows duplicate blank TRON rows with repeated APR (#32110)#32111metamask-aep[bot] wants to merge 1 commit into
Conversation
…epeated APR (#32110) (agent-run-25c25cb2)
|
CLA Signature Action: Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:
By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository. 0 out of 1 committers have signed the CLA. |
|
I have read the CLA Document and I hereby sign the CLA |
|



Summary
The Earn deposit token picker was rendering multiple duplicate blank-named TRON rows with the same APR. The root cause was in
selectAccountTokensAcrossChainsUnifiedinmultichain.ts: Tron assets whose metadata had not yet resolved (emptysymbol, noassetsMetadataentry) were bypassing the existingisTronSpecialAsset()filter. That function contains a!symbolguard that short-circuits tofalsewhen the symbol is empty, so those unresolved assets were passed through, classified as canonical TRX tokens (because they are stored under theslip44namespace and thusisNativeis true), and rendered as one duplicate Earn row per unresolved asset — all sharing the same witness APY.The fix adds a single targeted guard immediately after the
isTronSpecialAsset()check: any Tron-chain token (chainId.startsWith('tron:')) with an emptysymbolis now skipped. This closes the specific escape hatch thatisTronSpecialAsset()cannot catch when metadata is absent, with no changes to the existing filter logic or any other code path.Source: #32110
Changes
Files:
app/selectors/multichain/multichain.test.tsapp/selectors/multichain/multichain.tsValidation
Status: Passed
Review
Status: approved (high confidence)
Findings:
String(token.chainId).startsWith('tron:')guards (isTronSpecialAsset skip, new empty-symbol skip, and non-mainnet skip) could be collapsed into a single structured block, but the current linear form is readable and correct.Agent Chain
Metadata
25c25cb2-a16a-4470-845f-26d616115ea1This PR was created by the MetaMask Autonomous Engineering Platform.
AEP Visual Validation
✅ Passed
Skipped visual validation: Repository is metamask-mobile (React Native iOS/Android), not the MetaMask browser extension.
Validation details
Skipped visual validation: Repository is metamask-mobile (React Native iOS/Android), not the MetaMask browser extension. The mm CLI visual-testing skill requires a browser extension environment and cannot launch or interact with a native mobile app. The affected components (EarnTokenList, EarnDepositTokenListItem, selectAccountTokensAcrossChainsUnified) render exclusively inside the mobile native runtime. Grep confirms the changed selector is consumed only by mobile React Native components (app/selectors/earnController/earn/index.ts → app/components/UI/Earn/…), none of which are reachable through a browser extension popup or any web surface the mm CLI can drive.
metamask-mm-visual-validation — passed. Visual validation did not run.
Run
6f4a0059-c7b8-495d-8aa1-9375aa848af3