feat(trustwallet): add tron namespace support - #1438
Open
llawliet-l-l wants to merge 1 commit into
Open
llawliet-l-l wants to merge 1 commit into
llawliet-l-l wants to merge 1 commit into
Conversation
llawliet-l-l
requested review from
RyukTheCoder,
arlert-armin and
yeager-eren
as code owners
July 11, 2026 14:37
llawliet-l-l
force-pushed
the
feat/RC-304-trustwallet-tron-intergration
branch
from
July 18, 2026 12:01
50e92ae to
ad7da42
Compare
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.
Summary
Adds the Tron namespace to the Trust Wallet provider, wiring the extension's
TronLink-compatible instance (
window.trustwallet.tronLink) into the hub withconnect / disconnect / eager-connect, account-change tracking, and signing.
Changes
New
actions/tron.ts,builders/tron.ts,namespaces/tron.tsfollowing theactions/builders split;
Tronadded to provider metadata and registrationAccount changes subscribe to the instance's own
accountsChangedevent(
string[]of base58 addresses; empty array → disconnect)Custom
CustomTronSignerextendsDefaultTronSignerand strips the extratypefield Rango puts insideraw_data.contract[*].parameter.value, whichTrust's strict wallet-core parser rejects (signature unaffected — it covers
txID/raw_data_hex)Message-less user rejection (
{code: 4001}) mapped to"User rejected the request" with the code kept on the error
canEagerConnectreturnsfalse(never throws) when the late-injected Tronshim isn't ready — auto-connect runs independently of the
installedflagDocs: support matrix and provider readme notes (switch-account
reload caveat, auto-connect limitation)
How tested
Manually against the Trust Wallet browser extension: connect, user rejection
(correct message, no masked listener error), account-switch/disconnect events,
and a real swap transaction that drove the wallet-core parser fix. Package
build, eslint, and ts-check pass.
Checklist: