Skip to content

Support 18-decimal stablecoins on BNB Chain - #2154

Merged
MusabShakeel576 merged 1 commit into
qafrom
claude/keen-cerf-uheob3
Jun 15, 2026
Merged

Support 18-decimal stablecoins on BNB Chain#2154
MusabShakeel576 merged 1 commit into
qafrom
claude/keen-cerf-uheob3

Conversation

@MusabShakeel576

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for USDT on Base and BNB Chain, and updates the decimal handling logic to dynamically read decimals from the bridge token configuration instead of assuming all stablecoins use 6 decimals.

Key Changes

  • Added USDT token configuration for Base and BNB Chain in BRIDGE_TOKENS constant
    • Base: USDT with 6-decimal version (version: '1')
    • BNB Chain: Binance-Peg USDT with 18 decimals
  • Updated decimal resolution logic in useTransferToWallet.ts and AddFundsToWalletForm.tsx
    • Now reads decimals from bridge token configuration first
    • Falls back to the default 6 decimals for stablecoins if not explicitly configured
    • Allows proper handling of 18-decimal stablecoins like Binance-Peg USDC/USDT on BNB Chain
  • Enhanced token info object in AddFundsToWalletForm.tsx to include decimals from token data

Implementation Details

The key insight is that stablecoins don't always use 6 decimals—Binance-Peg versions on BNB Chain use 18 decimals. Rather than hardcoding decimal assumptions, the code now:

  1. Looks up the token configuration from BRIDGE_TOKENS based on the source chain and token name
  2. Uses the configured decimals if available
  3. Falls back to sensible defaults (6 for stablecoins, 18 for others) only when decimals aren't explicitly set

This ensures amount parsing, formatting, and validation work correctly across different token implementations.

https://claude.ai/code/session_012jF7BVuvcndnadBoePaAWG

Add USDT to the Base and BNB Chain bridge token lists so it appears in the
Add Funds and Deposit to Savings token selectors (which render from
BRIDGE_TOKENS), matching the backend bridge-deposit support:
- Base: Tether USD 0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2 (6 dp)
- BNB Chain: Binance-Peg BSC-USD 0x55d398326f99059fF775485246999027B3197955 (18 dp)

Derive token decimals from the bridge config in the Add Funds wallet-transfer
flow (form + useTransferToWallet) instead of hardcoding stablecoins to 6 dp, so
the 18-decimal BNB Chain stablecoins (USDC/USDT) transfer and display correctly.

https://claude.ai/code/session_012jF7BVuvcndnadBoePaAWG
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored Jun 15, 2026 9:02am
solid-app-staging Ignored Ignored Jun 15, 2026 9:02am

Request Review

@MusabShakeel576
MusabShakeel576 merged commit 76f514c into qa Jun 15, 2026
5 checks passed
@MusabShakeel576
MusabShakeel576 deleted the claude/keen-cerf-uheob3 branch June 15, 2026 11:47
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