Skip to content

feat(wallet): roll SDK and complete TRON integration#3446

Merged
CharlVS merged 7 commits intodevfrom
feat/tron-support
Mar 18, 2026
Merged

feat(wallet): roll SDK and complete TRON integration#3446
CharlVS merged 7 commits intodevfrom
feat/tron-support

Conversation

@CharlVS
Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS commented Mar 18, 2026

Summary

  • roll the SDK submodule to the latest origin/dev TRON support commit
  • finish app-side TRON/TRC20 integration across legacy coin mapping, custom token import, explorer/history support, and withdraw fee gating
  • normalize fiat provider chain mapping so TRX and TRC20 assets resolve to the correct wallet asset IDs
  • raise TRON asset priority in wallet ordering

Validation

  • ran dart format on the touched files
  • ran flutter analyze on the changed TRON-related files
  • did not run unit/integration tests because repository guidance says those suites are currently failing and static analysis/code review should be used instead

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 18, 2026

Visit the preview URL for this PR (updated for commit a54ad91):

https://walletrc--pull-3446-merge-ru0wzdhb.web.app

(expires Wed, 25 Mar 2026 19:44:11 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

tokenData = await _repository.fetchCustomToken(
networkAsset.id,

P1 Badge Pass the selected token subclass into custom-token imports

When the user selects TRC20, this call sends the parent asset ID into the repository, and the repository derives all protocol behavior from networkId.subClass (fetchCustomToken / _createNewCoin). Because this commit split TRON into CoinSubClass.trx and CoinSubClass.trc20, the repo will now see the native trx subclass instead of trc20, so it uses TRX address/token-info semantics and never enters the new CoinSubClass.trc20 protocol branch. In practice, custom TRC20 imports will fail or build the wrong asset metadata.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/bloc/fiat/banxa_fiat_provider.dart
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 184a4ccc9c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/bloc/fiat/base_fiat_provider.dart Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review


P1 Badge Use token decimals instead of TRX chain decimals

For newly supported TRC20 imports, the created asset reuses platformAsset.id.chainId, so the token inherits TRX’s decimals instead of the response.info.decimals returned by getTokenInfo(). Downstream code like Asset.toCoin() and withdraw amount formatting read asset.id.chainId.decimals, so any TRC20 token that is not 6-decimal will display balances and send amounts at the wrong scale after import.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Preserve native TRX fiat support, send Ramp TRON asset codes correctly, and keep imported TRC20 token decimals aligned with token metadata.
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Mar 18, 2026

Addressed the remaining Codex review items:

  • The earlier TRC20 subclass propagation issue from review 3969072299 was already fixed in 184a4ccc9 on this branch.
  • The TRC20 token-decimals issue from review 3969752231 is fixed in 57a221dd3; imported custom tokens now carry getTokenInfo() decimals into both the protocol config and AssetId.chainId metadata.

Also added focused regression coverage and re-ran flutter analyze on the touched files.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57a221dd31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/bloc/fiat/banxa_fiat_provider.dart
Comment thread lib/bloc/custom_token_import/bloc/custom_token_import_bloc.dart Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9246a495fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/bloc/custom_token_import/bloc/custom_token_import_bloc.dart
Keep previously saved parent/token metadata intact when a custom-token preview is cancelled, while still fully rolling back preview-only activations.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@CharlVS CharlVS merged commit 67337c2 into dev Mar 18, 2026
3 of 12 checks passed
@CharlVS CharlVS deleted the feat/tron-support branch March 18, 2026 19:58
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.

1 participant