refactor(analytics): migrate ramp portfolio URL builder#43436
Conversation
✨ Files requiring CODEOWNER review ✨📈 @MetaMask/ramp (1 files, +12 -7)
|
831d4d7 to
9a1df05
Compare
Builds ready [9a1df05]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs
|
|
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. |
9a1df05 to
fc24623
Compare
Builds ready [fc24623]
⚡ Performance Benchmarks (Total: 🟢 14 pass · 🟡 11 warn · 🔴 0 fail)
Bundle size diffs
|
fc24623 to
49a7584
Compare
Builds ready [49a7584] [reused from fc24623]
⚡ Performance Benchmarks (Total: 🟢 14 pass · 🟡 11 warn · 🔴 0 fail)
Bundle size diffs
|
Refresh slice from main-synced monolithic branch.
49a7584 to
d27a240
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the Ramp “buy” portfolio URL builder hook to stop reading legacy MetaMetrics selectors/state and instead use the canonical analytics fields introduced in the Analytics Phase B foundation work.
Changes:
- Replace
getMetaMetricsIdwithgetAnalyticsIdwhen populating themetametricsIdURL param. - Replace
getParticipateInMetaMetricswith canonical consent selectors (getCompletedMetaMetricsOnboarding,getOptedIn) and deriveisMetaMetricsEnabledfrom them.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Part 7 of the Analytics Phase B split (supersedes monolithic #43406).
Owner: @MetaMask/ramp
Reason: Ramp portfolio URL builder still reads legacy metrics selectors.
Solution: Update
useRamps.tsto use canonical analytics selectors.Depends on: #43430
Changelog
CHANGELOG entry: null
Related issues
Part of https://github.com/MetaMask/MetaMask-planning/issues/7331
Manual testing steps
yarn startand verify ramp/buy flows build portfolio URLs with correct metrics paramsPre-merge author checklist
Pre-merge reviewer checklist