refactor(scanner): unify through /scan, drop /send/scan and /receive/scan#1093
Closed
orveth wants to merge 3 commits into
Closed
refactor(scanner): unify through /scan, drop /send/scan and /receive/scan#1093orveth wants to merge 3 commits into
orveth wants to merge 3 commits into
Conversation
resolveSendDestination becomes synchronous (dropped the redundant isValidLightningAddress pre-check; getInvoiceFromLud16 already surfaces invalid addresses via toast later in the send flow). The send-scanner no longer awaits quote/network work — it classifies, sets the destination on the store, marks a pendingContinue flag, and navigates to /send. SendInput consumes the flag on mount and auto-fires handleContinue, so the user lands on /send with the destination pinned and the Continue button already in its loading state. Errors surface as a toast on /send. Closes #1092 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
…/scan The send and receive flows now use the universal /scan route instead of dedicated /send/scan and /receive/scan routes. /scan already does sync classification (classifyInput + validateBolt11) so the slowness from #1092 — scanner staying open during async network work — is gone: the scanner closes the moment a QR decodes. Scan icons on /send and /receive pass their currently selected account through the URL (accountId / selectedAccountId), which /scan preserves when forwarding to the destination route. Cross-flow scans (e.g. cashu token scanned while on /send) work because each destination route reads its own param name. No auto-continue: user clicks Continue manually on /send, same as when arriving via /scan from the home page today. resolveSendDestination stays synchronous (kept from previous commit) so the paste flow on /send also no longer pre-pings LNURL. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The /scan route is entered with a slideUp transition (Scan icons on /, /send, /receive); the close-X button slides down. Make the classify-handler navigations match — close the scanner downward on successful scan instead of sliding left to the destination route. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
this changes the behavior of the send and receive scanners so closing in favor of #1096 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolveSendDestination+ quote inproceedWithSend). On slow internet the user couldn't tell the scan registered./send/scanand/receive/scanentirely. The universal/scanroute (_protected.scan.tsx) already does fully sync classification (classifyInput+validateBolt11) and just sets a URL hash + navigates. It doesn't have the slowness issue./sendand/receiveScan icons now link to/scanwith the current account passed through the URL (accountId/selectedAccountId)./scanpreserves search params when forwarding to the destination, so the user's account selection is retained.resolveSendDestinationis now synchronous — dropped the redundant `isValidLightningAddress` pre-check. `getInvoiceFromLud16` already surfaces invalid addresses via toast later in the flow, so the pre-check just duplicated a round trip. This also speeds up the paste flow on /send.Net code change
4 files deleted, 4 files modified, +11 / -161 LOC.
Test plan
Generated with Claude Code