Description
Users must open Freighter or an external explorer to check their current XLM and USDC balances while using the dApp, breaking their workflow when deciding whether they have enough funds to pay an invoice. A balance display in the wallet area with a manual refresh button should surface this information in-app.
Technical Context
src/components/wallet/WalletBalanceDisplay.tsx (new) calls src/app/api/wallet/balance/route.ts (new), which queries Horizon /accounts/<publicKey> for native and USDC balances. The balance is rendered in src/components/wallet/WalletMenu.tsx below the address display. A refresh icon button triggers a refetch via src/hooks/useWalletBalance.ts invalidating the swr key. Balances auto-refresh every 30 seconds when the menu is open.
Acceptance Criteria
Description
Users must open Freighter or an external explorer to check their current XLM and USDC balances while using the dApp, breaking their workflow when deciding whether they have enough funds to pay an invoice. A balance display in the wallet area with a manual refresh button should surface this information in-app.
Technical Context
src/components/wallet/WalletBalanceDisplay.tsx(new) callssrc/app/api/wallet/balance/route.ts(new), which queries Horizon/accounts/<publicKey>for native and USDC balances. The balance is rendered insrc/components/wallet/WalletMenu.tsxbelow the address display. A refresh icon button triggers a refetch viasrc/hooks/useWalletBalance.tsinvalidating theswrkey. Balances auto-refresh every 30 seconds when the menu is open.Acceptance Criteria