Skip to content

fix(chain-adapter): use public JSON-RPC for EVM balance queries - #159

Merged
Gaubee merged 1 commit into
mainfrom
fix/evm-balance-rpc
Jan 4, 2026
Merged

Gaubee merged 1 commit into
mainfrom
fix/evm-balance-rpc

Conversation

@Gaubee

@Gaubee Gaubee commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

问题

外链资产(ETH、BNB)在钱包中不显示。

原因

walletapi.bfmeta.info 服务不支持 EVM 链:

  • /wallet/eth/address/balance 返回 404
  • /wallet/bnb/address/balance 返回 404

修复

切换到公开的 JSON-RPC 端点:

  • Ethereum: ethereum-rpc.publicnode.com
  • BSC: bsc-rpc.publicnode.com

使用标准的 eth_getBalance、eth_blockNumber、eth_gasPrice 方法。

验证

curl -s -X POST 'https://ethereum-rpc.publicnode.com' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...","latest"],"id":1}'
# 返回正常余额

The walletapi.bfmeta.info service does not support EVM chains (/wallet/eth
and /wallet/bnb return 404). Switch to public RPC endpoints:
- Ethereum: ethereum-rpc.publicnode.com
- BSC: bsc-rpc.publicnode.com

This fixes the bug where external chain assets (ETH, BNB) were not visible.
@Gaubee
Gaubee merged commit 9ee8cb6 into main Jan 4, 2026
5 checks passed
@Gaubee
Gaubee deleted the fix/evm-balance-rpc branch January 4, 2026 08:49
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