Skip to content

fix(send): wire refreshQuote into Send and PayRequest QuoteCard (#39) - #89

Open
ghzhost wants to merge 1 commit into
StellarSend:mainfrom
ghzhost:fix/quote-refresh-wiring
Open

fix(send): wire refreshQuote into Send and PayRequest QuoteCard (#39)#89
ghzhost wants to merge 1 commit into
StellarSend:mainfrom
ghzhost:fix/quote-refresh-wiring

Conversation

@ghzhost

@ghzhost ghzhost commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Resolves #39.

Problem

QuoteCard has an existing Refresh button controlled by the onRefresh prop and an expired warning state telling users to refresh their rate, but neither Send.tsx nor PayRequest.tsx passed onRefresh. When an exchange quote expired, the review screen became a dead end without a way to refresh the rate.

Solution

  1. Exposed refreshQuote from useSendPayment, which calls quoteApi.refreshQuote(quote.id) and falls back to re-requesting a quote with the current form values.
  2. Passed onRefresh={refreshQuote} to <QuoteCard /> in both src/pages/Send.tsx and src/pages/PayRequest.tsx.
  3. Added unit tests in src/components/send/QuoteCard.test.tsx verifying the Refresh button renders when onRefresh is provided, triggers the callback upon click, and displays the expired warning when expired.

Verification

  • NODE_ENV=test npm test: 28 test suites, 117 tests passing.
  • npm run build: Typecheck (tsc) and Vite bundle build pass cleanly with 0 errors.

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.

useRefreshQuote is dead code and QuoteCard's onRefresh is never wired up — an expired quote is a dead end with no way to refresh

1 participant