Skip to content

Transaction History API and Next.js 15 Build Fixes#253

Merged
Baskarayelu merged 4 commits intoRemitwise-Org:mainfrom
Agbeleshe:API
Feb 27, 2026
Merged

Transaction History API and Next.js 15 Build Fixes#253
Baskarayelu merged 4 commits intoRemitwise-Org:mainfrom
Agbeleshe:API

Conversation

@Agbeleshe
Copy link
Contributor

@Agbeleshe Agbeleshe commented Feb 25, 2026

Pull Request: Transaction History API and Next.js 15 Build Fixes

close: #167

Description

This PR implements the transaction history and status endpoints and resolves several critical build blockers related to the Next.js 15 migration and Stellar SDK updates.


Key Changes

1. Remittance History and Status APIs

Horizon Integration

  • Added fetchTransactionHistory and fetchTransactionStatus to lib/remittance/horizon.ts to fetch payment records directly from the Stellar network.

New Endpoints

  • GET /api/remittance/history

    • Protected endpoint
    • Supports pagination (cursor, limit)
    • Supports status filtering
    • Returns transactions for the authenticated user
  • GET /api/remittance/status/[txHash]

    • Utility endpoint
    • Retrieves the current status of any transaction by its hash

Documentation

  • Added detailed API specifications in docs/remittance-api.md.

2. Next.js 15 & CI Readiness Fixes

Async Route Parameters

  • Updated all dynamic API routes (e.g., [id], [txHash]) to access params asynchronously to comply with Next.js 15 breaking changes.

Async Headers/Cookies

  • Fixed split/route.ts and other routes to properly await cookies() and headers().

Dependency Cleanup

  • Replaced the missing uuid package with native crypto.randomUUID() to resolve build-time resolution errors.

Stellar SDK Compatibility

  • Fixed Horizon.Server imports.
  • Corrected exported contract functions in:
    • lib/contracts/insurance.ts
    • lib/contracts/bill-payments.ts

Filename Casing Fix

  • Resolved filename casing mismatch for SixMonthTrendsWidget that caused build failures on case-sensitive filesystems.

Verification Results

Automated Tests

  • npm run lint — Passed
  • npx tsc --noEmit — Passed (All 50+ type errors resolved)
  • npm run build — Passed (Production build successful)

Manual Verification

  • Verified history API response mapping and pagination logic.
  • Confirmed session protection for private endpoints.
  • Validated error handling for invalid transaction hashes.
image

@Baskarayelu
Copy link
Contributor

please resolve the conflicts

@Baskarayelu
Copy link
Contributor

@Agbeleshe Can you please resolve the conflicts?

@Agbeleshe
Copy link
Contributor Author

@Baskarayelu On it

- Connect transaction history page to /api/v1/remittance/history endpoint
- Add real-time transaction status filtering (all, completed, pending, failed)
- Implement search functionality for hash, address, and memo
- Add pagination with cursor-based loading
- Update TransactionHistoryItem to display full transaction hash
- Fix TypeScript errors with proper type casting
- Add loading states and error handling
- Maintain existing UI/UX design patterns

Resolves issue Remitwise-Org#167: Transaction History and Status API
- Resolved all merge conflicts from upstream/main
- Preserved transaction history implementation
- Updated auth, goals, bills, and insurance APIs
- Synced package.json and dependencies
- Maintained all existing functionality
@Agbeleshe
Copy link
Contributor Author

conflict resolved @Baskarayelu

@Baskarayelu Baskarayelu merged commit fdeb173 into Remitwise-Org:main Feb 27, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction History and Status API

2 participants