fix(walletconnect): show a connecting state while a scanned QR is handled [PERA-4748] - #1111
Draft
yasin-ce wants to merge 1 commit into
Draft
fix(walletconnect): show a connecting state while a scanned QR is handled [PERA-4748]#1111yasin-ce wants to merge 1 commit into
yasin-ce wants to merge 1 commit into
Conversation
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.
Description
Scanning a WalletConnect QR stilled the camera and showed nothing while the pairing ran, so a multi-second connect looked identical to a hang.
isHandlingflag covering the window between a code being accepted and the deeplink resolving, with a dimmed spinner over the stilled frame.handleDeepLinkoutcomes plus thecatchand on visibility change, so the frame is never left dimmed.Related Issues
Checklist
Additional Notes
Copy is deliberately neutral ("Just a moment...") rather than "Connecting...". The flag is set for every handled deeplink type, not only WalletConnect — the browser paths are also slow and
ASSET_OPT_INdispatches detached. Most types resolve within a frame, so the overlay is a brief flash and must not claim to be connecting to something. The ticket's wording was WalletConnect-specific; this covers the whole class instead.Layering is load-bearing. The overlay is last in document order among the scanner's own layers so it covers the camera, but still ahead of
NotifierWrapper's toast, which has to stay on top — an explicitzIndexhere would hide the WalletConnect error behind it, which the existing comment in that file warns about.Hand-rolled instead of
PWLoadingOverlay. That component has the right shape, but it renders throughPWOverlay→ rneuiOverlay, i.e. its own Modal, and nesting a Modal inside the scanner's Modal is the same layering trap. Noted in a comment so the next reader doesn't have to re-derive it.Not covered here: the web scanner (
QRScannerContent.web.tsx) has a parallel handling path with no equivalent flag, so the extension still shows a frozen frame. Worth its own ticket rather than widening this PR. Also worth one on-device look that the overlay fills the frame — the layout isflex: 1with an absolutely-filled camera, and nothing betweenModal→NotifierWrapper→BaseErrorBoundaryguarantees the children fill the screen.