Skip to content

bug: TronAdapter.getBalance returns 503 — rpc.walletconnect.org doesn't support TRON #5621

@de-don

Description

@de-don

Description

TronAdapter.getBalance() uses BlockchainApiController.getAddressBalance() which routes the request through rpc.walletconnect.org/v1?chainId=tron:0x94a9059e. This endpoint returns 503 Service Unavailable because the WalletConnect RPC proxy does not support TRON networks.

File: packages/adapters/tron/src/adapter.tsgetBalance() method

Expected Behavior

getBalance() should return the actual TRX balance. Either:

  1. The RPC proxy should support TRON, or
  2. TronAdapter.getBalance() should use the TRON fullnode HTTP API directly (similar to how TronConnectConnector.sendTransaction() already uses fullnode URLs)

Reproduction

  1. Create AppKit with TronAdapter
  2. Connect TronLink
  3. Observe console: POST https://rpc.walletconnect.org/v1?chainId=tron:0x94a9059e&projectId=... 503 (Service Unavailable)
  4. Balance in the AppKit modal shows 0 TRX

Impact

  • Balance always shows 0 in AppKit modal/account view
  • Console error spam on every connection and network switch
  • [TronAdapter] getBalance error: Error: HTTP status code: 503 logged

Workaround

Override tronAdapter.getBalance after construction to use tronWeb.trx.getBalance() directly:

tronAdapter.getBalance = async (params) => {
    const balance = await tronWeb.trx.getBalance(params.address);
    return { balance: tronWeb.fromSun(balance).toString(), symbol: 'TRX' };
};

Environment

  • @reown/appkit: 1.8.19
  • @reown/appkit-adapter-tron: 1.8.19
  • Vanilla JS (Angular)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions