fix: use Android intent URL for Phantom deeplinks#5493
Conversation
Universal Links don't work reliably on many Android browsers (Opera, UC Browser, Samsung Internet, in-app browsers like Facebook, Instagram). This change uses Android intent URLs on Android devices which bypass browser app link verification and work on all Android browsers. - iOS continues to use Universal Links (well supported by Safari) - Android now uses intent URLs that trigger OS-level intent resolution - Added androidPackage constant for Phantom - Updated tests to cover both iOS and Android scenarios Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 70e93f0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
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=712 👉 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 |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
The host must be part of the path after intent://, not a parameter in the Intent fragment. The host= parameter is metadata for Android's intent resolver, not the URI host. Before: intent://ul/browse/...#Intent;scheme=https;host=phantom.app;... After: intent://phantom.app/ul/browse/...#Intent;scheme=https;... The previous format constructed https://ul/browse/... (wrong) The corrected format constructs https://phantom.app/ul/browse/... (correct) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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.
Update Android intent URL format to use the host= parameter in Intent fragment instead of including the host in the path. Before: intent://phantom.app/ul/browse/...#Intent;scheme=https;package=...;end After: intent://ul/browse/...#Intent;scheme=https;host=phantom.app;package=...;end This follows the correct Android intent URL specification where the host should be specified in the Intent parameters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update Android intent URL to use the phantom:// scheme which works correctly on Android devices. Before: intent://ul/browse/...#Intent;scheme=https;host=phantom.app;package=app.phantom;end After: intent://browse/...#Intent;scheme=phantom;package=app.phantom;end The phantom scheme directly triggers the Phantom app's intent filter without requiring host parameter matching. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Problem
Phantom's
browsedeeplink only supports Universal Links (https://phantom.app/ul/browse/...). Many Android browsers don't properly implement Android App Links verification:Solution
Use Android intent URLs on Android devices which bypass browser app link verification and trigger OS-level intent resolution:
Changes
packages/controllers/src/utils/MobileWallet.ts: Added Android detection and intent URL generation for Phantompackages/controllers/tests/utils/MobileWallet.test.ts: Updated tests to cover both iOS (Universal Link) and Android (Intent URL) scenariosTesting
Related
🤖 Generated with Claude Code
Note
Improves Phantom mobile redirect reliability by using Android intent URLs on Android while retaining Universal Links on iOS.
androidPackagetoCUSTOM_DEEPLINK_WALLETS.PHANTOMand Android detection viaCoreHelperUtil.isAndroid()MobileWalletUtil.handleMobileDeeplinkRedirectto build Phantom intent URL on Android and fallback to Universal Link elsewhereMobileWallet.test.tsto cover iOS UL vs Android intent flows and preserves existing behaviors for Solflare, Coinbase, and BinanceWritten by Cursor Bugbot for commit 70e93f0. This will update automatically on new commits. Configure here.