refactor: rename analytics source from sdk_connect_v2 to mm_connect#28359
Conversation
The product/brand name is MetaMask Connect (MWP), not "SDK Connect V2". Update the SourceType enum key and string value so analytics events carry source: 'mm_connect' instead of 'sdk_connect_v2'. WAPI-1388
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
This is a pure analytics/metrics rename with no functional behavior changes:
No E2E test tags are needed as no user-facing functionality is changed. The change is purely an internal analytics label rename. Performance Test Selection: |
|



Summary
The product/brand name is MetaMask Connect (MWP), not "SDK Connect V2". This renames the analytics
sourceproperty value fromsdk_connect_v2tomm_connectso events correctly reflect the product name.Changes:
SourceType.SDK_CONNECT_V2 = 'sdk_connect_v2'→SourceType.MM_CONNECT = 'mm_connect'in bothuseAnalytics.types.ts(primary) anduseMetrics.types.ts(deprecated compat copy)useOriginSource.tsuseOriginSource.test.tsWAPI-1388 - https://consensyssoftware.atlassian.net/browse/WAPI-1388
Depends on the
useOriginSourcefix from WAPI-1380 (already merged to main).CHANGELOG entry: n/a
Test plan
useOriginSource.test.ts— all 8 tests pass with renamed valuesNote
Low Risk
Low risk rename of an analytics
SourceTypevalue and constant key; primary risk is mislabeling or missing any downstream consumers expecting the old value.Overview
Renames the analytics source identifier for SDK v2/MetaMask Connect from
sdk_connect_v2(SDK_CONNECT_V2) tomm_connect(MM_CONNECT) in the canonicaluseAnalyticstypes and the deprecateduseMetricscompatibility export.Updates
useOriginSourceto emitSourceType.MM_CONNECTwhen an origin matches a v2 connection, and adjustsuseOriginSourceunit tests to assert the new source and wording.Written by Cursor Bugbot for commit 96ede62. This will update automatically on new commits. Configure here.