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. |
d4ea474 to
1533d64
Compare
✨ Files requiring CODEOWNER review ✨🔐 @MetaMask/web3auth (3 files, +514 -11)
|
Builds ready [1533d64]
UI Startup Metrics (1254 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [4867af8]
UI Startup Metrics (1255 ± 105 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
4867af8 to
6b13182
Compare
Builds ready [6b13182]
UI Startup Metrics (1262 ± 90 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [2a5328a]
UI Startup Metrics (1330 ± 121 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [5a0fee5]
UI Startup Metrics (1329 ± 120 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [1e78fd3]
UI Startup Metrics (1278 ± 116 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
1e78fd3 to
57fc6c0
Compare
Builds ready [57fc6c0]
UI Startup Metrics (1270 ± 101 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [7c689a4]
UI Startup Metrics (1256 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [7c689a4]
UI Startup Metrics (1256 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
a34319b to
40f19a2
Compare
Builds ready [40f19a2]
UI Startup Metrics (1302 ± 104 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [277f46d]
UI Startup Metrics (1288 ± 110 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [e37df88]
UI Startup Metrics (1325 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [6439aca]
UI Startup Metrics (1281 ± 104 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
6439aca to
f7e27c4
Compare
Builds ready [f7e27c4]
UI Startup Metrics (1200 ± 112 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
c59acf0 to
e2d9328
Compare
Builds ready [9cad7ac]
UI Startup Metrics (1356 ± 92 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [bbb072b]
UI Startup Metrics (1353 ± 92 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [0792872]
UI Startup Metrics (1381 ± 99 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [e88f96b]
UI Startup Metrics (1364 ± 93 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…navigation logic and overrides
Builds ready [154d98c]
UI Startup Metrics (1354 ± 98 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| usedInUi: true, | ||
| }, | ||
| deferredDeepLink: { | ||
| includeInStateLogs: true, |
There was a problem hiding this comment.
Should we exclude this in stateLogs? as we might have wallet address within the link
There was a problem hiding this comment.
Well, I'm not sure about this. Or if this is a concern.
I need answers from @davidmurdoch and @aorlovskiy
There was a problem hiding this comment.
Trying to understand the concern here. So it is probably about having link like this one for swaps:
https://link.metamask.io/swap?amount=22000000000000000&from=eip155%3A1%2Fslip44%3A60&sig_params=amount%2Cfrom%2Cto&to=eip155%3A59144%2Ferc20%3A0x176211869cA2b568f2A7D4EE941E073a821EE1ff&sig=KYoYO9beWAlLIT6GUATcHj98hoDiO9h3UZC76ZcMfreKsJcFtCp_vJCWqa9s8-6aO4FLPgoMI02k03t2WcL5bASo, the params are the things that can be logged:
| Parameter | Value |
|---|---|
| amount | 22000000000000000 |
| from | eip155:1/slip44:60 |
| sig_params | amount,from,to |
| to | eip155:59144/erc20:0x176211869cA2b568f2A7D4EE941E073a821EE1ff |
| sig | KYoYO9beWAlLIT6GUATcHj98hoDiO9h3UZC76ZcMfreKsJcFtCp_vJCWqa9s8-6aO4FLPgoMI02k03t2WcL5bA |
But, since the user just onboarded, it's never the user's address, it's only the stuff within the deferred deep link which can never be the user address.
There was a problem hiding this comment.
I was referring to for example,
https://link.metamask.io/buy?address=0xacA92E438df0B2401fF60dA7E4337B687a2435DA&amount=100&chainId=1
There was a problem hiding this comment.
Yea, so that address (0xacA92E438df0B2401fF60dA7E4337B687a2435DA) is the address from a token. It is not the user's address 🤔. Since the user is installing MetaMask for the first time by using that deferred deep link.
I'm not sure If we have a concern logging addresses that are not related to the user. I need to ask @aorlovskiy
There was a problem hiding this comment.
Overall I would not be concerned about logging deeplink address with its parameters.
Deeplink is a public entity that someone have created and sent to someone else - so it should never have any sensitive information. While havign the parameters of the deeplink logged may help us troubleshoot the issues
There was a problem hiding this comment.
Deeplink is a public entity that someone have created and sent to someone else
Eh, not necessarily. Private and temporary URLs are a thing, and i could see us supporting something like that in the future. If we ever create a deeplink for other features, like sending funds, or linking accounts, or installs, etc. that information could be captured in the URL. There are lots of use cases of URLs being used to store secrets.
I don't think we should capture it in state logs.
There was a problem hiding this comment.
Alright, thanks for clarification and discussion, includeInStateLogs is now set to false.
| [dispatch, navigate], | ||
| ); | ||
|
|
||
| const onDone = useCallback(async () => { |
There was a problem hiding this comment.
Yo it is a big function, we ended up with huge dependency list. Maybe we can extract some of them, like useDeferredDeepLinkNavigation to simplify the function? wdyt?
There was a problem hiding this comment.
While I completely understand the concern here, I think that it might be better if code owners of this component and the onboarding process in general, consider refactoring it.
From my point of view, I've just added around 10 lines and changed a few because of the additional logic, which is minor compared to the existing size of onDone function.
Deferred deep link functionality is adding some sort of edge case flow, while the other stuff is from the original onboarding (normal flows +/- the sidebar).
I'm also leaning towards leaving the navigation logic within this component and not nesting it and encapsulating, since there is also parent component OnboardingFlow doing some navigation for some cases, so it would maybe make too much of a distributed navigation handling across these components 😅
|
Looks good to me in general. Left few comments 💭 |
Builds ready [d588b46]
UI Startup Metrics (1346 ± 87 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [380098d]
UI Startup Metrics (1360 ± 88 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [a5d1c97]
UI Startup Metrics (1418 ± 107 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [c37e814]
UI Startup Metrics (1413 ± 98 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
LGTM ! |
Description
This PR adds deferred deep link functionality.
Deferred deep link is retrieved from a cookie from
metamask.iowebsite (if available). Then, it is handled through the onboarding process.Notes:
AppStateController, after successful installation.Changelog
CHANGELOG entry: Added deferred deep links
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5216
Manual testing steps
Screenshots/Recordings
Before
Deferred deep links were not available before. All functionality from before must remain the same. Existing e2e tests are not affected in any way.
After
Sidepanel enabled
Navigation
Link: https://link.metamask.io/swap?amount=22000000000000000&from=eip155%3A1%2Fslip44%3A60&sig_params=amount%2Cfrom%2Cto&to=eip155%3A59144%2Ferc20%3A0x176211869cA2b568f2A7D4EE941E073a821EE1ff&sig=KYoYO9beWAlLIT6GUATcHj98hoDiO9h3UZC76ZcMfreKsJcFtCp_vJCWqa9s8-6aO4FLPgoMI02k03t2WcL5bA
swap_sidebar_enabled.mov
Redirection
Link: https://link.metamask.io/buy?address=0xacA92E438df0B2401fF60dA7E4337B687a2435DA&amount=100&chainId=1&sig=aagQN9osZ1tfoYIEKvU6t5i8FVaW4Gi6EGimMcZ0VTDmAlPDk800-Nx3131QlDTmO3UF2JCmR2Y2RAJhceNOYw
buy_with_sidebar.mov
Side panel disabled
Navigation
Link: https://link.metamask.io/swap?amount=22000000000000000&from=eip155%3A1%2Fslip44%3A60&sig_params=amount%2Cfrom%2Cto&to=eip155%3A59144%2Ferc20%3A0x176211869cA2b568f2A7D4EE941E073a821EE1ff&sig=KYoYO9beWAlLIT6GUATcHj98hoDiO9h3UZC76ZcMfreKsJcFtCp_vJCWqa9s8-6aO4FLPgoMI02k03t2WcL5bA
swap_without_sidebar.mov
Redirection
Link: https://link.metamask.io/buy?address=0xacA92E438df0B2401fF60dA7E4337B687a2435DA&amount=100&chainId=1&sig=aagQN9osZ1tfoYIEKvU6t5i8FVaW4Gi6EGimMcZ0VTDmAlPDk800-Nx3131QlDTmO3UF2JCmR2Y2RAJhceNOYw
buy_without_sidebar.mov
Edge cases
When deferred deep link is not properly signed
Screen.Recording.2026-02-09.at.15.26.54.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches install-time behavior, adds the
cookiespermission, and changes post-onboarding navigation/redirect logic (including opening external URLs), which can impact user flow if edge cases are missed.Overview
Adds deferred deep link support by reading a
deferred_deeplinkcookie on install (requires newcookiespermission), persisting it inAppStateController, and tagging the pre-opt-inAppInstalledMetaMetrics event with deep-link attribution.Updates onboarding completion (
CreationSuccessful) to resolve and act on the deferred deep link: navigate to an internal route, redirect/open an external URL, or route to a deep-link interstitial for unsigned/invalid links; it also clears the stored deep link after use and avoids the onboarding-flow auto-redirect so the completion page can perform this navigation. Includes new shared deep-link types/utilities plus unit/e2e coverage and a new background actionremoveDeferredDeepLinkwired throughmetamask-controller.Written by Cursor Bugbot for commit c37e814. This will update automatically on new commits. Configure here.