Skip to content

chore: Earn deposit token list shows duplicate blank TRON rows with repeated APR (#32110)#32111

Draft
metamask-aep[bot] wants to merge 1 commit into
mainfrom
agent/6255326d
Draft

chore: Earn deposit token list shows duplicate blank TRON rows with repeated APR (#32110)#32111
metamask-aep[bot] wants to merge 1 commit into
mainfrom
agent/6255326d

Conversation

@metamask-aep

@metamask-aep metamask-aep Bot commented Jun 19, 2026

Copy link
Copy Markdown

Summary

The Earn deposit token picker was rendering multiple duplicate blank-named TRON rows with the same APR. The root cause was in selectAccountTokensAcrossChainsUnified in multichain.ts: Tron assets whose metadata had not yet resolved (empty symbol, no assetsMetadata entry) were bypassing the existing isTronSpecialAsset() filter. That function contains a !symbol guard that short-circuits to false when the symbol is empty, so those unresolved assets were passed through, classified as canonical TRX tokens (because they are stored under the slip44 namespace and thus isNative is 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 empty symbol is now skipped. This closes the specific escape hatch that isTronSpecialAsset() cannot catch when metadata is absent, with no changes to the existing filter logic or any other code path.

Source: #32110

Changes

Metric Value
Files changed 2
Lines added +112
Lines removed -0

Files:

  • app/selectors/multichain/multichain.test.ts
  • app/selectors/multichain/multichain.ts

Validation

Status: Passed

  • lint: passed (blocking)

Review

Status: approved (high confidence)

Findings:

  • [low] The three 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

Step Status Duration Attempt
triage passed 8s 1
plan passed 338s 1
execute passed 115s 1
validate passed 0s 1
review passed 79s 1
__meta passed - 0

Metadata

  • Run ID: 25c25cb2-a16a-4470-845f-26d616115ea1
  • Total cost: $1.1953
  • Evidence: complete

This 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

@github-actions

Copy link
Copy Markdown
Contributor

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:

I have read the CLA Document and I hereby sign the CLA

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.
❌ @metamask-aep[bot]

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 19, 2026
@mm-token-exchange-service mm-token-exchange-service Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jun 19, 2026
@michaelmccallam

Copy link
Copy Markdown
Contributor

I have read the CLA Document and I hereby sign the CLA

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-M team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant