-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add new domain deeplinks #15467
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
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
Provided a few pieces of specific feedback. You are also missing unit testing.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15467 +/- ##
==========================================
- Coverage 69.25% 69.21% -0.05%
==========================================
Files 2434 2435 +1
Lines 52417 52452 +35
Branches 7930 7937 +7
==========================================
+ Hits 36304 36306 +2
- Misses 13786 13818 +32
- Partials 2327 2328 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…mask-mobile into add/new-domain-deeplinks-1
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.
Pull Request Overview
Adds support for a new public deeplink domain (link.metamask.io
and link-test.metamask.io
) by updating platform configs, routing constants, and deeplink handling logic for the home, swap, and ramp screens.
- Add new universal link domains in iOS entitlements and plist, plus Android manifest intent filters
- Introduce AppConstants for the new hosts and extend ACTIONS enum with
HOME
andSWAP
- Implement new handling in
handleUniversalLink
, addhandleSwapUrl
handler, and cover with tests
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
ios/MetaMask/MetaMaskDebug.entitlements | Whitelist new applinks domains for debug builds |
ios/MetaMask/MetaMask.entitlements | Whitelist new applinks domains for production builds |
ios/MetaMask/MetaMask-Flask-Info.plist | Add new branch universal link domains |
ios/MetaMask/Info.plist | Add new branch universal link domains |
android/app/src/main/AndroidManifest.xml | Add intent filters for new universal link domains |
app/core/AppConstants.ts | Define MM_IO_UNIVERSAL_LINK_HOST and MM_IO_UNIVERSAL_LINK_TEST_HOST |
app/constants/deeplinks.ts | Add HOME and SWAP to ACTIONS and PREFIXES |
app/core/DeeplinkManager/ParseManager/handleUniversalLink.ts | Extend logic to route /home , /swap , and /buy-crypto on new domains |
app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts | Add tests for new domain actions |
app/core/DeeplinkManager/Handlers/handleSwapUrl.ts | New handler to parse swap query params and navigate accordingly |
app/core/DeeplinkManager/Handlers/handleSwapUrl.test.ts | Unit tests for swap URL handler |
app/core/DeeplinkManager/DeeplinkManager.ts | Add _handleOpenHome and _handleSwap methods |
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.
Unit tests names are not matching our guidelines.
app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts
Outdated
Show resolved
Hide resolved
…mask-mobile into add/new-domain-deeplinks-1
app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts
Outdated
Show resolved
Hide resolved
app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts
Outdated
Show resolved
Hide resolved
app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts
Outdated
Show resolved
Hide resolved
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.
I love it now!
|
Description
This is to prepare for adding new public universal links to the app to be triggered by a new domain.
This adds 3 routes: home, swap, and ramp (buy) for the new domain
There are currently blockers for making this functional in the app - 5/21/25
Related issues
Manual testing steps
Home
https://metamask.app.link/home
Ramp - Buy
https://link-test.metamask.io/buy-crypto?chainId=59144&address=0x176211869cA2b568f2A7D4EE941E073a821EE1ff&amount=100
Swap
https://link-test.metamask.io/swap?from=eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&to=eip155:1/erc20:0xdAC17F958D2ee523a2206206994597C13D831ec7&value=0x38d7ea4c68000
3. App should open to the appropriate screen
Screenshots/Recordings
/home
deeplink-home.mp4
/swap
deeplink-swap.mp4
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist