Skip to content

feat(balances): enable BSC chain to surface stuck funds#2107

Merged
MusabShakeel576 merged 1 commit into
qafrom
claude/serene-noether-osU2b
May 31, 2026
Merged

feat(balances): enable BSC chain to surface stuck funds#2107
MusabShakeel576 merged 1 commit into
qafrom
claude/serene-noether-osU2b

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Summary

Enable BSC (chain 56) so users who accidentally sent BEP-20 tokens (e.g. Binance-Peg USDC from tx 0x7f395780) to their Solid safe address can see and transfer those funds.

Changes

  • constants/alchemy.ts — BSC added to Alchemy supported chains (bnb-mainnet.g.alchemy.com).
  • lib/wagmi.ts — BSC wired into chains array, RPC URLs, and transports.
  • constants/tokens.ts — BNB added to NATIVE_TOKENS and NATIVE_COINGECKO_TOKENS.
  • hooks/useBalances.ts — fetches BSC ERC-20s via Alchemy dispatcher + native BNB via viem, processes into new bscTokens array.
  • hooks/useWalletTokens.ts — re-exports bscTokens, includes in hasTokens.
  • components/Send/TokenSelector.tsx — combines BSC into the token list; falls back to viem's chain name when BRIDGE_TOKENS has no entry for the chain (so BSC rows don't crash on .name).

Data source

BSC is Alchemy-only — public Blockscout has no BSC instance. The existing fetchTokenBalancesWithFallback dispatcher returns [] from the Blockscout path if Alchemy fails (no URL configured), so the fail-open behavior is preserved.

Backend action required (not in this PR)

Insert Binance-Peg USDC into the swap-tokens MongoDB collection, or filterTokenList in useBalances.ts will hide it:

{
  "name": "Binance-Peg USD Coin",
  "symbol": "USDC",
  "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",
  "decimals": 18,
  "chainId": 56,
  "isActive": true
}

Note: 18 decimals (not 6 like canonical USDC).

Test plan

  • Insert BSC USDC row into swap-tokens collection in QA Mongo.
  • Confirm BSC USDC balance appears in wallet for the affected user's safe address.
  • Send a small test amount of BSC USDC out via the Send flow to an external address.
  • Verify the row label renders as USDC on BNB Smart Chain (fallback chain name from viem).
  • Confirm native BNB shows up if the safe has any BNB.
  • Verify existing Ethereum / Fuse / Base / Arbitrum balances still render correctly.

Generated by Claude Code

Fetch BSC balances (ERC-20 via Alchemy + native BNB via viem) the same
way Arbitrum, Base, and Ethereum are handled. Wire BSC through wagmi
chains/transports and add BNB to native token + CoinGecko price lookups.

The Send token list now includes BSC tokens and falls back to the viem
chain name when a chain isn't in BRIDGE_TOKENS, so BSC entries don't
crash the row label.

BSC is Alchemy-only — Blockscout has no BSC instance and the existing
fallback returns [] gracefully on Alchemy failure.

Unblocks users who accidentally sent BEP-20 USDC (or any other token)
to their Solid safe address on BSC.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored May 31, 2026 9:59am
solid-app-staging Ignored Ignored May 31, 2026 9:59am

Request Review

@MusabShakeel576 MusabShakeel576 merged commit d026127 into qa May 31, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/serene-noether-osU2b branch May 31, 2026 10:12
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.

2 participants