Skip to content

Commit c31a46d

Browse files
committed
feat(setup): query Base USDC balance + show OKX fund walkthrough
After eden's "show what chain to fund + how much" request. The PR #8 wallet-ready box hinted at funding but had no live balance check and no concrete OKX-side steps. Users still asked "do I actually need to fund?" and "where on OKX do I send from?". Changes: - Query Base-chain USDC balance via the existing BalanceMonitor right after OKX login completes (or right after detecting an existing session in the already-signed-in branch). Network/RPC failure is non-fatal — we render "could not query Base RPC" instead of aborting setup. - Add a balance row to the wallet-ready summary box, severity-tagged: empty (< $0.0001) → yellow ⚠ "fund to unlock paid models" low ($0.0001..$1) → yellow ⚠ "recommend $5+" ok (≥ $1) → green ✓ "ready for paid models" - Only render the funding walkthrough when balance is missing/empty/low. Already-funded users see a tight 6-line box; users that need money see the OKX-specific 3-step guide: Fund via OKX (Base network, USDC): 1. Open the OKX app → Wallet 2. Send USDC on Base to the address above 3. ~$5 covers thousands of paid requests Naming OKX explicitly + naming Base explicitly avoids users bridging to a wrong network (the recurring support footgun). - Lazy-import BalanceMonitor so the CLI doesn't pull viem until setup actually needs to query a balance.
1 parent 1004a6d commit c31a46d

3 files changed

Lines changed: 55317 additions & 54208 deletions

File tree

0 commit comments

Comments
 (0)