Skip to content

Feat/charge withdraw improvements - #545

Open
janetpius-cmd wants to merge 4 commits into
kellymusk:mainfrom
janetpius-cmd:feat/charge-withdraw-improvements
Open

Feat/charge withdraw improvements#545
janetpius-cmd wants to merge 4 commits into
kellymusk:mainfrom
janetpius-cmd:feat/charge-withdraw-improvements

Conversation

@janetpius-cmd

@janetpius-cmd janetpius-cmd commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Description:

  • Instant withdrawal refresh — "Recent cash-outs" now shows a submitted withdrawal immediately (optimistic prepend) instead of depending on a refetch race; also polls every 15s so status changes show up live.
  • cNGN asset selector on charge screen — replaces hardcoded XLM with an XLM/cNGN selector; cNGN is disabled ("Coming soon") until NEXT_PUBLIC_CNGN_ISSUER is set, and never silently falls back to XLM.
  • Optional charge memo — adds a "Note / memo" input on the charge screen, wired through api.createPaymentRequest and shown on the existing QR receipt memo field.
  • Payment-code expiry warning — reuses components/onramp/countdown-timer.tsx on the request page, turns amber under 60s, shows "This payment code has expired" + "Generate new code" instantly at 0s.

Closes #453
Closes #454
Closes #455
Closes #456


Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • 🚀 New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing behaviour to change)
  • ♻️ Refactor (no functional change, code quality improvement)
  • 🎨 UI / design update
  • 📦 Dependency update
  • 🔧 Configuration / tooling change
  • 📝 Documentation update
  • 🔒 Security fix

Changes Made


Testing

  • Manual testing in local development (npm run dev)
  • Unit tests added or updated (npm test)
  • Existing tests still pass (npm test)
  • Tested on Stellar Testnet (if blockchain changes are included)
  • Tested with demo mode OFF (NEXT_PUBLIC_DEMO_MODE=false)
  • Verified on mobile viewport (if UI changes are included)

Test steps for reviewers:


Screenshots / Screen Recording

Before After

Checklist

Code Quality

  • Code follows the project's style and conventions (ESLint passes: npm run lint)
  • TypeScript types are correct (no new any without justification): npm run type-check
  • No secrets, wallet keys, or PII committed to the repository
  • New NEXT_PUBLIC_* variables added to .env.example (if applicable)

Observability

  • New API routes use captureError / log from lib/observability
  • New Stellar SDK calls are wrapped in try/catch forwarding to captureError
  • No sensitive data (private keys, mnemonics, tokens) passed to log.* or captureError

Security

  • User inputs are validated with Zod (or equivalent) before processing
  • No new server-side secrets are exposed via NEXT_PUBLIC_* variables
  • Webhook signatures are verified where applicable
  • Rate limiting applied to new public API endpoints (Upstash)

Accessibility (UI changes only)

  • Interactive elements have accessible labels (aria-label, aria-describedby)
  • Colour contrast meets WCAG AA (4.5:1 for normal text)
  • Keyboard navigation works for new interactive components

Documentation

  • Inline code comments added for non-obvious logic
  • README or docs updated if the change affects setup or configuration
  • SECURITY.md updated if the change affects the security surface (rare)

Deployment Notes


Related Issues / PRs

Prepend the newly created withdrawal to local state as soon as the
create call succeeds instead of waiting on a full refetch that could
race the write, and poll withdrawals/balances in the background so
status transitions (pending -> completed/failed) show up without a
manual reload.

Claude-Session: https://claude.ai/code/session_01LJBRoinS4QS6tAyWh4mKva
Replace the hardcoded XLM asset on the charge screen with a selector
between XLM and cNGN. cNGN stays disabled and labelled "Coming soon"
until NEXT_PUBLIC_CNGN_ISSUER is configured, and the charge flow never
silently falls back to XLM if the requested asset has no SEP-7 URI.

Claude-Session: https://claude.ai/code/session_01LJBRoinS4QS6tAyWh4mKva
Add a "Note / memo" input to the charge screen and thread it through
api.createPaymentRequest. The QR receipt page already displayed the
memo field, so a merchant-supplied note now shows up there for the
customer with no further changes needed.

Claude-Session: https://claude.ai/code/session_01LJBRoinS4QS6tAyWh4mKva
Reuse components/onramp/countdown-timer.tsx on the payment request
page instead of its own inline countdown, turn it amber under 60s
remaining, flip to an expired view the instant the client clock hits
zero (rather than waiting on the next status poll), and add a
"Generate new code" button that recreates the charge with the same
amount, asset, and memo.

Claude-Session: https://claude.ai/code/session_01LJBRoinS4QS6tAyWh4mKva
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@janetpius-cmd 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

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@janetpius-cmd is attempting to deploy a commit to the kelly musk's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant