Skip to content

feat: transaction history, funding thresholds, invoice classification and KYC document dashboard - #484

Merged
TS-mfon merged 1 commit into
StellarState:devfrom
JamesVictor-O:feature/294-462-468-469-tx-history-funding-thresholds-classification-kyc
Oct 18, 2026
Merged

TS-mfon merged 1 commit into
StellarState:devfrom
JamesVictor-O:feature/294-462-468-469-tx-history-funding-thresholds-classification-kyc

Conversation

@JamesVictor-O

Copy link
Copy Markdown
Contributor

Resolves four issues in one PR.

#294: Transaction history page

  • New /transactions page (linked from the desktop and mobile nav) listing the connected wallet's platform transactions, newest first.
  • Each row shows a type label (invest, claim, list, cancel, settle), amount, date, status and the tx hash, with a deep link to Stellar Expert on the active network.
  • Filter by type: the type is sent to the API and also applied client-side, in case the backend ignores it.
  • Infinite scroll loads older pages through an IntersectionObserver sentinel.
  • API: fetchWalletTransactions → GET /wallets/:address/transactions?type=&cursor=. Common backend spellings are normalized (investment → invest, cancel_listing → cancel, …).

#462: Funding threshold progress bar

  • FundingProgressBar takes an optional minThreshold. When set, it draws a marker on the bar and shows Raised / Min threshold / Max cap labels.
  • Minimum met badge between the min and the cap. Fully funded badge at the cap (renamed from "Funded").
  • Invoice gains optional min_funding_threshold and max_funding_cap. Cards and the detail page use the cap as the target, falling back to amount. Existing callers are unaffected.

#468: Admin category and risk tier assignment

  • The review queue at /admin/review gets category (trade finance, real estate, SME, infrastructure) and risk tier (low, medium, high) selectors per pending invoice. Values are saved through PATCH /admin/invoices/:id/classification.
  • Approve stays disabled until both values are saved.
  • Category and risk tier badges appear on marketplace invoice cards, the invoice detail page and the review history tabs.
  • Admin-only access is enforced by the existing role check on /admin/review, and the endpoint returns 403 for non-admins. The marketplace already filters by category and risk tier (from Build investor dashboard home with portfolio summary and quick actions #420).
  • Added the fetchPendingInvoices / fetchReviewedInvoices / approveInvoice / rejectInvoice helpers and their types. The review components imported these, but they were never defined in lib/api, so those components failed to type-check. The existing AdminInvoiceReview tests now pass.
  • Fixed a missing CompareToggleButton import in invoice-card.tsx.

#469: Issuer KYC document dashboard

  • /kyc/status now shows a card per document: business registration, director ID and proof of address.
  • Each state has its own styling: pending, approved, rejected, expired.
    • Approved: shows the verification date.
    • Rejected: shows the reason and a Resubmit button.
    • Expired: shows the expiry date and a Renew button.
  • Resubmit and Renew upload a replacement (PDF/JPG/PNG, max 10 MB) via uploadDocument, then call POST /kyc/documents/:type/resubmit. The card switches to pending straight away.
  • API: fetchKycDocuments → GET /kyc/documents.

Testing

  • New tests: TransactionHistory, KycDocumentStatusDashboard, AdminInvoiceReviewQueue.classification, InvoiceClassificationBadges, plus threshold cases in InvoiceFundingProgressBar. All pass.
  • No regressions in the full suite: no test that passed on dev fails on this branch, and 4 tests that failed on dev now pass. TypeScript errors went from 389 on dev to 369. The remaining failures and errors were already on dev and are in files this PR doesn't touch.
  • ESLint is clean on all changed files.

Closes #294
Closes #462
Closes #468
Closes #469

… and KYC document dashboard

- Transaction history page at /transactions with type filter, infinite
  scroll, newest-first ordering and Stellar Expert deep links (StellarState#294)
- Funding progress bar shows min threshold marker, raised / min / max
  labels and Minimum met / Fully funded badges (StellarState#462)
- Admin review queue assigns category and risk tier, required before
  approval; values shown on invoice cards and detail page (StellarState#468)
- Issuer KYC document cards per document type with resubmit / renew
  upload flow that resets the document to pending (StellarState#469)

Closes StellarState#294
Closes StellarState#462
Closes StellarState#468
Closes StellarState#469
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@JamesVictor-O Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@TS-mfon
TS-mfon merged commit e8a5d5d into StellarState:dev Oct 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants