-
Notifications
You must be signed in to change notification settings - Fork 1.6k
refactor: base wallet deeplink support & improve custom deeplink ux #5479
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
Conversation
When users select Coinbase wallet from the all wallets list on mobile
for EVM chains, use the cbwallet://miniapp?url={REDIRECT_URL} deeplink
schema to open the Base app's in-app browser.
This extends the existing Coinbase deeplink support which only worked
for Solana to also work for EVM chains.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
For wallets that use Universal Links instead of WalletConnect deeplinks
(Phantom, Solflare, Coinbase, Binance), show a proper connecting UI
with "Continue in {wallet name}" message and an "Open" button to retry
the deeplink, instead of showing "Not Detected".
Changes:
- Add isCustomDeeplinkWallet() helper to MobileWalletUtil
- Export MobileWalletUtil from controllers package
- Add 'customDeeplink' Platform type
- Create w3m-connecting-wc-custom-deeplink partial
- Update w3m-connecting-wc-view to detect and show custom deeplink UI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
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=687 👉 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 |
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.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Add setEnableCoinbase setter to OptionsController - Initialize enableCoinbase state during AppKit setup - Add enableCoinbase check to mobile deeplink redirect for Coinbase - Fix headless connect() to find Base Account connector via explorerId for API wallets (matches headful behavior) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
packages/scaffold-ui/src/partials/w3m-connecting-wc-custom-deeplink/index.ts
Show resolved
Hide resolved
- Add customDeeplink case to generateTabs in w3m-connecting-header - Update isCustomDeeplinkWallet to validate wallet-chain combinations: - Phantom/Solflare: Solana only - Coinbase: Solana and EVM only - Binance: Bitcoin only - Update tests for namespace-aware isCustomDeeplinkWallet Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…lflare - Phantom supports Solana, EVM, and Bitcoin (doesn't support WalletConnect) - Solflare only supports Solana, add namespace check in handleMobileDeeplinkRedirect - Update tests accordingly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…5479) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Description
This PR improves the mobile wallet connection experience with several enhancements:
1. Coinbase/Base Wallet EVM Deeplink Support
Added support for Coinbase wallet's native deeplink schema on EVM chains. When users select Coinbase wallet from the wallet list on a mobile device whi
le connected to an EVM network (Ethereum, Base, Polygon, etc.), the app now redirects using
cbwallet://miniapp?url={REDIRECT_URL}to open the dApp directly in Coinbase Wallet's in-app browser.
This complements the existing Solana deeplink support (
go.cb-w.com/dapp?cb_url=) that was already implemented.2. Custom Deeplink Wallet UX Improvement
Certain wallets (Phantom, Solflare, Coinbase, Binance) use Universal Links for mobile connections instead of WalletConnect's standard deeplink flow. Pr eviously, when users selected these wallets on mobile:
Before: Users saw "Not Detected" with download prompts, which was incorrect and confusing since the connection flow was already in progress in the wallet app.
After: Users now see a purpose-built connecting screen with:
3. enableCoinbase Support for Headless Mode
Fixed headless mode (
useAppKitWalletshook) to properly handle Coinbase wallet connections:enableCoinbase: true(default): Opens Coinbase web wallet (keys.coinbase.com) via Base Account connectorenableCoinbase: false: Uses deeplinks to open Coinbase in-app browserThe fix involves a fallback connector lookup by wallet ID via
explorerId, which allows API wallets (without pre-populated connectors) to find the cor rect connector.4. Namespace-Aware Custom Deeplink Validation
isCustomDeeplinkWallet()now validates wallet-chain combinations to prevent showing custom deeplink UI for unsupported chains:Changes Summary
packages/controllers/src/utils/MobileWallet.tsisCustomDeeplinkWallet(),enableCoinbasecheck in deeplink redirectpackages/controllers/exports/index.tspackages/controllers/exports/react.tsconnect()to find Base Account connector viaexplorerIdfallbackpackages/controllers/src/utils/TypeUtil.tspackages/controllers/src/controllers/OptionsController.tssetEnableCoinbasesetterpackages/appkit/src/client/appkit-base-client.tsenableCoinbasestatepackages/scaffold-ui/src/partials/w3m-connecting-wc-custom-deeplink/packages/scaffold-ui/src/partials/w3m-connecting-header/index.tscustomDeeplinkcase ingenerateTabspackages/scaffold-ui/src/views/w3m-connecting-wc-view/index.tspackages/controllers/tests/utils/MobileWallet.test.tsType of change
Checklist
Note
Improves mobile connection flows and headless behavior.
cbwallet://miniapp) and refines Solana/BTC deeplinks withenableCoinbasegating inMobileWalletUtil; exports utilitycustomDeeplinkplatform and new UI (w3m-connecting-wc-custom-deeplink) with header/tab support;w3m-connecting-wc-viewdetects wallets viaisCustomDeeplinkWallet()(namespace-aware)enableCoinbaseintoOptionsControllerand initializes it inappkit-base-client; adds lab configflag-no-coinbaseand menu entryconnect()to fall back to connectors byexplorerId(e.g., open Coinbase web wallet via Base Account), and defaults namespace to active chainPlatform), tests for deeplink behavior and detection across Solana/EVM/BitcoinWritten by Cursor Bugbot for commit 6502848. This will update automatically on new commits. Configure here.