Skip to content

FE-xxx: feat: build Stellar payment instructions UI — address, memo QR, countdown, and auto-confirm #371

Description

@BigBen-7

Description

After a ticket purchase creates an order, the backend returns { destinationAddress, memo, amountXLM }. There is no frontend UI for this Stellar payment flow — users have no idea what to do after clicking "Purchase".

What to do

Create src/features/orders/components/StellarPaymentInstructions.tsx:

  • Destination address: display truncated + full on hover, one-click copy button
  • Memo: displayed in red with a prominent warning — "Required — your payment will fail without the memo"
  • Amount: XLM amount with copy button
  • QR code: generate a web+stellar:pay?destination=G...&amount=X&memo=Y QR code using qrcode.react
  • Countdown timer: shows time remaining before order expires (default 15 minutes)
  • Auto-confirm: poll GET /api/orders/:id every 5 seconds — when status === "PAID", redirect to /tickets with a success toast "🎉 Tickets issued! Check your email."
  • Expiry: when countdown hits 0 show an expired state with a "Retry Payment" button calling POST /api/orders/:id/retry-payment

Files touched

  • src/features/orders/components/StellarPaymentInstructions.tsx (new)
  • src/hooks/useOrderStatus.ts (new — polling hook)
  • package.json (add qrcode.react)

PR requirement

  • Closes #[issue_id] — Timeframe: 72 hours

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requeststellarStellar payment flow

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions