Description
The withdrawal route still returns a placeholder for the on-chain flow and only decrements the local balance in simulated mode.
User Story
As a wallet user,
I want to withdraw funds to a real Stellar destination,
so that I can move value off-platform when needed.
Requirements and Context
- Files:
app/app/api/wallet/withdraw/route.ts, app/lib/sep10.ts, app/lib/prisma.ts
- Build and submit a real Stellar payment transaction when
simulated=false
- Persist the pending and completed withdrawal states correctly
- Surface on-chain submission failures with useful errors
Suggested Implementation
// WITHDRAW ROUTE
// 1. Build the Stellar payment transaction.
// 2. Submit it to the network.
// 3. Store the withdrawal record with chain metadata.
// 4. Update local balance only after a valid settlement path.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/stellar-withdrawals
- Depends on: Stellar submission utilities
- PR:
feat(backend): settle wallet withdrawals on Stellar
Description
The withdrawal route still returns a placeholder for the on-chain flow and only decrements the local balance in simulated mode.
User Story
As a wallet user,
I want to withdraw funds to a real Stellar destination,
so that I can move value off-platform when needed.
Requirements and Context
app/app/api/wallet/withdraw/route.ts,app/lib/sep10.ts,app/lib/prisma.tssimulated=falseSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/stellar-withdrawalsfeat(backend): settle wallet withdrawals on Stellar