Description
The wallet balance endpoint still falls back to local ledger data and a placeholder XLM asset snapshot instead of reconciling with live chain state.
User Story
As a wallet user,
I want to see my real balances and transfer history,
so that the wallet page matches the ledger.
Requirements and Context
- Files:
app/app/api/wallet/balance/route.ts, app/app/api/wallet/transactions/route.ts, app/lib/prisma.ts
- Pull live asset balances from Stellar when non-simulated mode is used
- Reconcile local wallet history with on-chain transfer records
- Return consistent balance, asset, and transaction payloads to the frontend
Suggested Implementation
// BALANCE AND TRANSACTIONS
// 1. Load chain balances for the wallet address.
// 2. Merge live chain state with local transaction history.
// 3. Return the normalized payload to the client.
// 4. Keep simulated mode as a fallback only.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/wallet-sync
- Depends on: Stellar read utilities and wallet address lookup
- PR:
feat(backend): sync wallet balances and transaction history from chain
Description
The wallet balance endpoint still falls back to local ledger data and a placeholder XLM asset snapshot instead of reconciling with live chain state.
User Story
As a wallet user,
I want to see my real balances and transfer history,
so that the wallet page matches the ledger.
Requirements and Context
app/app/api/wallet/balance/route.ts,app/app/api/wallet/transactions/route.ts,app/lib/prisma.tsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/wallet-syncfeat(backend): sync wallet balances and transaction history from chain