fix: use tron_getAddressBalance JSON-RPC for TRON balance and update network preset IDs - #5565
Conversation
…update network preset IDs - Use tron_getAddressBalance custom JSON-RPC method via BAPI instead of the balance REST endpoint (avoids TronGrid rate limits) - Make getAddressBalance generic with optional method/params to support chain-specific RPC methods - Parse Quicknode account response to extract balance in SUN and convert to TRX - Update TRON network preset image IDs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
9 Skipped Deployments
|
Visual Regression Test Results ✅ PassedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=790 👉 Please review the visual changes in Chromatic and accept or reject them. |
|
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit > size-limit |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Summary
/v1/account/{address}/balanceREST endpoint (which uses TronGrid with free-plan rate limits) to thetron_getAddressBalancecustom JSON-RPC method via BAPI (uses Quicknode, BAPI PR #1350). Parses the Quicknode account response to extract balance in SUN and converts to TRX (÷ 10^6).getAddressBalance: Made the method accept optionalmethodandparamsparameters so chain-specific adapters (TRON, TON, etc.) can customize the JSON-RPC call without needing separate controller methods. TON adapter is unaffected (uses defaults).Changes
controllers/BlockchainApiController.tsgetAddressBalancenow accepts optionalmethodandparams, generic<T>for response typecontrollers/utils/TypeUtil.tsadapters/tron/adapter.tstron_getAddressBalancemethod, parsesresponse.data[0].balancefrom Quicknodeappkit-utils/PresetsUtil.tsNote
Requires
tron_getAddressBalanceto be available on the BAPI RPC provider for the project ID being used. Currently confirmed working on Quicknode provider. See BAPI PR #1350.Test plan
getAddressBalanceparams)🤖 Generated with Claude Code
Note
Medium Risk
Updates TRON balance retrieval to a new JSON-RPC method and loosens
BlockchainApiController.getAddressBalancetyping/parameters, which could break balance display if the RPC method/response shape differs or is unavailable.Overview
TRON balance fetching now uses
BlockchainApiController.getAddressBalancewith thetron_getAddressBalanceJSON-RPC method and converts the returned SUN value to TRX viaNumberUtil.BlockchainApiController.getAddressBalanceis generalized to accept optionalmethod/paramsand a generic response type, and TRON mainnet/testnet preset network image IDs are updated inPresetsUtil.Written by Cursor Bugbot for commit be0e9ef. This will update automatically on new commits. Configure here.