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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (2 files, +25 -21)
👨🔧 @MetaMask/core-extension-ux (1 files, +2 -2)
👨🔧 @MetaMask/extension-platform (1 files, +1 -0)
🕵️ @MetaMask/extension-privacy-reviewers (1 files, +1 -0)
🧪 @MetaMask/qa (2 files, +2 -0)
👨🔧 @MetaMask/wallet-integrations (1 files, +29 -13)
|
Builds ready [f5c94b5]
UI Startup Metrics (1308 ± 115 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [4d56605]
UI Startup Metrics (1326 ± 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 [c854338]
UI Startup Metrics (1484 ± 117 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
c854338 to
9114e96
Compare
Builds ready [0f95f20]
UI Startup Metrics (1350 ± 91 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [36a5fab]
UI Startup Metrics (1396 ± 101 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
There was a problem hiding this comment.
PR is looking really good. one case which I am not clear about:
- Connect MM to an account, opt for referrals and see referral code being applied (amelie in this case)
- Disconnect MM
- Connect MM to account 3. Don't opt for referrals
- After connection, referral code still apply (different one as shared in screencast)
Screen.Recording.2026-02-11.at.11.06.01.AM.mov
Builds ready [4a50274]
UI Startup Metrics (1432 ± 104 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Thanks for testing @NidhiKJha ! That's a great point. The reason is because of how GMX stores and applies referral codes. If a user goes to a referral screen, that code gets saved in local storage. If there is a code in local storage and the user does not have an existing code, that code gets shown on the Referrals page. It jars a little bit with our UI it's true, but we can't change the GMX implementation so I don't see a way around this really. Users can always remove or change the referral code if they wish to. |
Description
This PR adds GMX as a new DeFi referral partner and improves the DeFi referral middleware to handle both
wallet_requestPermissionsandeth_requestAccountsconnection methods.Changes:
createDefiReferralMiddlewareto also trigger on successfuleth_requestAccountsresponsesgmx_referral_consentapproval type in confirmation templatesChangelog
CHANGELOG entry: Added GMX defi referral support
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CEUX-880
Manual testing steps
yarn startScreenshots/Recordings
Before
After
gmx.referrals.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches the post-connection RPC middleware path and broadens the conditions that trigger referral handling; mistakes could cause missed/extra consent prompts or unexpected referral flows for partner sites.
Overview
Adds GMX as a new DeFi referral partner, including partner config (origin/referral/learn-more URLs), a new
gmx_referral_consentapproval type wired into confirmation templates, and UI copy via the newgmxReferralSubtitlelocale key.Updates preferences/test fixtures to include an empty
gmxentry in thereferralsstate, adds a Storybook story for GMX consent, and enhancescreateDefiReferralMiddlewareto trigger referrals after successfuleth_requestAccountsresponses in addition towallet_requestPermissions(with updated, more generic error logging and broader test coverage).Written by Cursor Bugbot for commit 4a50274. This will update automatically on new commits. Configure here.