Skip to content

feat: add confirmation dialog before submitting onramp/offramp orders (closes #327)#340

Open
Creative-Titilayo wants to merge 1 commit into
kellymusk:mainfrom
Creative-Titilayo:fix/327-transaction-confirmation-dialog
Open

feat: add confirmation dialog before submitting onramp/offramp orders (closes #327)#340
Creative-Titilayo wants to merge 1 commit into
kellymusk:mainfrom
Creative-Titilayo:fix/327-transaction-confirmation-dialog

Conversation

@Creative-Titilayo

Copy link
Copy Markdown

Overview

This PR adds a transaction confirmation dialog as the final step before submitting onramp and offramp orders. Previously both flows created an order on a single button click, with no final summary or explicit confirmation. The calculator's submit now opens a review dialog, and the create-order API is only called after the user clicks "Confirm and Pay" — preventing accidental orders and meeting financial-UX standards.

Related Issue

Closes #327

Changes

🪟 Onramp Confirmation Dialog

  • [MODIFY] components/onramp/onramp-page-client.tsx
  • Added showConfirmDialog state and a handleInitialSubmit handler that opens the dialog instead of submitting directly.
  • Wired the calculator's onSubmit to handleInitialSubmit; the existing handleSubmit (create-order) now only runs from the dialog's "Confirm and Pay" button.
  • Added a review dialog surfacing: amount paying, crypto received, exchange rate and its expiry (rate countdown), processing fee, network fee, destination wallet address, and estimated completion time.
  • Closes the dialog on successful order creation.

🪟 Offramp Confirmation Dialog

  • [MODIFY] components/offramp/offramp-page-client.tsx
  • Added showConfirmDialog state and a handleInitialSubmit handler that opens the dialog instead of submitting directly.
  • Wired the calculator's onSubmit to handleInitialSubmit; the existing handleSubmit (create-order) now only runs from the dialog's "Confirm and Pay" button.
  • Added a review dialog surfacing: amount selling, fiat received, exchange rate and its rate-lock expiry, network fee, destination bank-account note, and estimated completion time.
  • Imported the shared Dialog and Button UI primitives.
  • Closes the dialog on successful order creation.

Verification Results

Acceptance Criteria Status
Shows exact amount sending / receiving
Shows exchange rate applied and its expiry
Shows network (and processing) fees
Shows estimated completion time
Shows destination address / bank account
Requires explicit "Confirm and Pay" before submission
Order is only created after confirmation
Production build passes successfully

Both the onramp and offramp flows previously created an order on a single
button click, with no final review step. This adds a confirmation dialog
as the last step before calling the create-order API.

The dialog surfaces, per the requirements in kellymusk#327:
- exact amount sending / receiving
- exchange rate applied and its expiry (rate countdown / rate-lock)
- processing and network fees
- estimated completion time
- destination wallet address (onramp) / bank account note (offramp)

The calculator submit now opens the dialog (handleInitialSubmit); the order
is only created after the user explicitly clicks "Confirm and Pay".

Closes kellymusk#327

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Creative-Titilayo 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.

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Creative-Titilayo 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

Development

Successfully merging this pull request may close these issues.

[UX] Add transaction confirmation dialog before submitting onramp/offramp orders

1 participant