Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions app/api/v1/remittance/history/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { fetchTransactionHistory } from '../../../../../lib/remittance/horizon';
export const dynamic = 'force-dynamic';

/**
* GET /api/remittance/history (protected)
* GET /api/v1/remittance/history (protected)
* Returns list of transactions for session user.
*
* Query params:
*
* Query params:
* - limit: number (default 10, max 200)
* - cursor: string (pagination)
* - status: 'completed' | 'failed' | 'pending'
Expand All @@ -35,7 +35,10 @@ export async function GET(req: NextRequest) {
status: status || undefined,
});

return NextResponse.json(history);
return NextResponse.json({
...history,
userAddress: session.address,
});
} catch (error: any) {
console.error('Error fetching remittance history:', error);
return NextResponse.json(
Expand Down
Loading