-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WIP] feat: add deeplinking fail detection to useAppKitWallets hook #5431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
Visual Regression Test Results ✅ PassedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=561 👉 Please review the visual changes in Chromatic and accept or reject them. |
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit > size-limit [baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||
| if (ConnectionController.state.wcError) { | ||
| ConnectionController.setWcError(false) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup effect immediately clears newly-set error state
The cleanup effect at lines 456-458 clears wcError whenever connectingWallet?.id changes. When the error detection logic sets connectingWallet to undefined and wcError to true, this triggers the cleanup effect on the next render cycle. The effect checks if (ConnectionController.state.wcError) and immediately sets it back to false. Even if the display condition bug were fixed, this cleanup logic would still clear the error before the user could see it. The cleanup intent is for wallet switching, but it incorrectly also triggers when the wallet is cleared due to an error.
Description
Testing another approach. might close #5430
Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist
Note
Hook & API updates
useAppKitWalletswithwcError, deep-link failure detection (visibility/focus/timeout), and newonErrorcallback deliveringWalletConnectionError(type,message,wallet,originalError).wcError,wcLinking, internal refs) and avoids reusing handledwcUriunless linking is cleared.Controllers
ConnectionController: addswcErrorstate withsetWcError, resetswcLinking/wcErrorinresetUri, tracks deep-link start (wcLinking) and timeout handling.Error utilities & types (common)
ConnectionErrorTypeandCONNECTION_ERROR_TYPEconstants,getErrorMessage()helper, and exportsProviderRpcErrorCode/ConnectionErrorType.Example UI (Next app)
ConnectCard.tsx: integratesuseAppKitWallets({ onError }), shows mobile deep-link failure banner with dismiss, suppresses duplicate toasts, hides QR on mobile.Config
tsconfig.jsonin example: switch JSX topreserve.Written by Cursor Bugbot for commit 803a4fa. This will update automatically on new commits. Configure here.