Description: The wallet page shows hardcoded USDC and XLM balances. A real implementation should fetch balances from the Stellar Horizon API and display all assets the account holds (including non-standard assets via trustlines).
Requirements:
- Replace the mock
refreshBalances with actual Horizon API calls
- Fetch
/accounts/{address} from Horizon and parse the balances array
- Display all assets: native (XLM), issued assets (USDC, etc.)
- Show the asset issuer for non-native assets
- Show a loading state while fetching, an error state on failure, and an empty state for new accounts
Suggested execution steps:
- In
lib/store/walletStore.ts, update refreshBalances to call Horizon
- Use the
HORIZON_URL from constants.ts
- Parse the response into the
AssetBalance[] type
- Update the wallet page to render dynamic balances instead of hardcoded ones
- Add trustline support: show which assets the account has trustlines for
- Handle the "account not found" Horizon response (account not funded yet)
Example commit message:
feat(stellar): replace mock wallet balances with real Horizon API data
Updated refreshBalances to fetch from Stellar Horizon /accounts/{address}
endpoint. Displays all held assets (XLM, USDC, custom) with issuer info.
Handles loading, error, and unfunded account states. Removes hardcoded
balance mock data from the wallet page.
Description: The wallet page shows hardcoded USDC and XLM balances. A real implementation should fetch balances from the Stellar Horizon API and display all assets the account holds (including non-standard assets via trustlines).
Requirements:
refreshBalanceswith actual Horizon API calls/accounts/{address}from Horizon and parse thebalancesarraySuggested execution steps:
lib/store/walletStore.ts, updaterefreshBalancesto call HorizonHORIZON_URLfromconstants.tsAssetBalance[]typeExample commit message: