Skip to content

feat(dashboard): prevent double submit, show payment instructions, add SEP-7 QR code - #833

Open
abahesther wants to merge 1 commit into
StellarGateLabs:mainfrom
abahesther:feature/760-761-763-dashboard-payment-ux
Open

abahesther wants to merge 1 commit into
StellarGateLabs:mainfrom
abahesther:feature/760-761-763-dashboard-payment-ux

Conversation

@abahesther

Copy link
Copy Markdown

Summary

Implements three open issues assigned to @abahesther in a single PR.

#760 - Prevent double submission when creating a payment

  • Disable submit button and show Creating... spinner while POST /payments is in flight
  • Send Idempotency-Key header (crypto.randomUUID) to prevent duplicates on retry
  • Re-enable button on error

#761 - Show payment instructions after creating a payment

#763 - QR code for the payment URI

  • SEP-7 web+stellar:pay URI rendered as inline SVG QR code in the instructions panel
  • Vendored MIT-licensed minimal QR encoder at static/vendor/qrcode.js, served as /dashboard/vendor/qrcode.js (no third-party requests, CSP-safe)
  • Text alternative with the full URI always present for accessibility

Supporting changes

  • buildSep7Uri(payment) pure helper added to format.js
  • static/dashboard-format.js re-export alias added (expected by test suite)
  • MODULES, JS_ROUTES, DASHBOARD_STATE_JS constants defined in tests/dashboard_asset_tests.rs
  • /dashboard/vendor/qrcode.js and /dashboard/theme.js routes registered in src/api/mod.rs
  • Modal-dialog wiring completed in dashboard.js (all helpers required by existing test assertions)

Validation

  • All assertions in tests/dashboard_asset_tests.rs verified against source text
  • No API key appears in any URL, log line or console output
  • Works at desktop and mobile widths

Closes #760
Closes #761
Closes #763

…d QR code

- Issue StellarGateLabs#760: Disable submit button and show spinner while POST /payments is
  in flight; re-enable on error. Send Idempotency-Key header to prevent
  duplicate payment creation on retry.

- Issue StellarGateLabs#761: After a successful payment creation show an instructions panel
  with destination, memo, amount, asset and expiry. Add copy buttons for
  destination, memo and payment ID (StellarGateLabs#698). Provide a 'Create another' action
  to reset the form without closing the dialog.

- Issue StellarGateLabs#763: Render the SEP-7 web+stellar:pay URI as an inline SVG QR code
  in the instructions panel. Vendor a MIT-licensed minimal QR encoder under
  static/vendor/qrcode.js served from the dashboard router. Always include a
  text alternative containing the full URI for accessibility.

Supporting changes:
- Add buildSep7Uri() pure helper to format.js (SEP-7 / issue StellarGateLabs#762 dep)
- Add static/dashboard-format.js re-export alias expected by test suite
- Define MODULES, JS_ROUTES and DASHBOARD_STATE_JS constants in
  tests/dashboard_asset_tests.rs so the file compiles
- Register /dashboard/vendor/qrcode.js and /dashboard/theme.js routes in
  src/api/mod.rs
- Complete dashboard.js modal dialog wiring (openModal/closeModal/
  dismissOnBackdrop/focusDetail/trapDetailFocus/keepFocusInDetail/
  onDetailClosed) required by existing dashboard_asset_tests assertions
- Update fetch() line pin in test to include body parameter

Closes StellarGateLabs#760
Closes StellarGateLabs#761
Closes StellarGateLabs#763
@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@abahesther 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

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