Skip to content

fix: tron trc20 balances for non-activated accounts + send warning#12191

Merged
gomesalexandre merged 5 commits intodevelopfrom
fix/tron-non-activated-balances
Mar 19, 2026
Merged

fix: tron trc20 balances for non-activated accounts + send warning#12191
gomesalexandre merged 5 commits intodevelopfrom
fix/tron-non-activated-balances

Conversation

@gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Mar 18, 2026

Description

Two fixes for Tron non-activated accounts:

  1. TRC20 balance discovery for non-activated accounts - The TronGrid /v1/accounts/{addr} API returns {"data":[]} for addresses that have never sent TRX (non-activated). Added a fallback in TronApi.getAccount() that checks hardcoded top tokens (USDT, USDC) + scans received TRC20 tx history to discover token contracts, then calls balanceOf() via triggerconstantcontract. Non-activated accounts with USDT/TRC20 balances now show up in the portfolio.

  2. Send flow warning for non-activated recipient - Added useIsTronAddressActivated hook that checks if a Tron recipient address is activated. On the send amount screen, if the recipient is non-activated and the asset is not native TRX, a yellow warning alert is shown: "This address hasn't been activated on Tron yet. Your tokens will arrive, but the recipient won't be able to move them until they also receive some TRX." Warn-and-allow - send is not blocked.

Issue (if applicable)

closes #12190

Risk

Low - Tron-specific changes, under the TRON feature flag. The balance fallback only triggers for non-activated accounts (empty data[] response from TronGrid). The send warning is informational only and doesn't block the flow.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Tron TRC20 token sends only.

Testing

Engineering

  1. Use a Tron address that has received USDT but has 0 TRX (non-activated)
  2. Add it to ShapeShift - USDT balance should now show in the portfolio
  3. Open the send flow for USDT (Tron), enter a non-activated Tron recipient address
  4. Verify the yellow warning appears on the amount screen

qabot run (6/6 passed): http://localhost:8080/runs/99d0a229-c7e4-49b3-b7d5-a3b93922f5d5

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Tron is behind the VITE_FEATURE_TRON flag.

Summary by CodeRabbit

  • Bug Fixes

    • Better discovery of TRC20 balances for Tron accounts missing on-chain token listings.
    • Activity detection now counts Tron token balances when evaluating account activity.
  • New Features

    • User-facing warning when sending to non-activated Tron addresses; send flow remains available.
    • On-send validation checks for Tron address activation.
  • Tests

    • End-to-end test added for non-activated Tron recipient behavior.
  • Documentation

    • New translation text for the non-activated Tron recipient warning.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usdt on tron not showing up in a wallet that has no trx balance

2 participants