feat: add BalanceBreakdown component with per-chain breakdown, Gateway tooltip, and in-motion indicator - #43
Open
consumeobeydie wants to merge 1 commit into
Conversation
…y tooltip, and in-motion indicator (closes circlefin#8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
Summary
This PR addresses the UX improvements requested in issue #8 by adding a new
BalanceBreakdowncomponent that replaces the plain balance display inwallet-dashboard.tsx.Changes
New:
components/balance-breakdown.tsxA self-contained component that renders:
Per-chain USDC breakdown — visual bar chart showing each chain's wallet balance as a proportion of total wallet holdings, with chain-specific colors (Arc Testnet: blue, Base Sepolia: indigo, Avalanche Fuji: red)
Gateway tooltip — an
Infoicon next to "Unified USDC Balance" that explains how Gateway abstracts liquidity across chains, distinguishing between spendable (Gateway) and per-chain (wallet) balancesUnified balance bar — a horizontal bar showing the Gateway vs wallet proportion at a glance
Funds-in-motion indicator — an animated pulse indicator when a cross-chain transfer is in progress (burn submitted, mint pending), with a tooltip explaining the attestation flow. Accepts an optional
pendingBalanceprop.Modified:
components/wallet-dashboard.tsx<BalanceBreakdown />Design decisions
pendingBalanceprop is optional (defaults to 0) — existing usage is unaffectedTooltip,Info,Zap,Walletfrom lucide-react)Screenshots
Before: two plain text balance fields with a flat chain list
After: unified visual breakdown with tooltips, bar charts, and in-motion state