Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0592523. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tags NOT selected:
Per tag dependency rules: SmokeTrade requires SmokeConfirmations (already selected). SmokePerps requires SmokeWalletPlatform (already selected) and SmokeConfirmations (already selected). Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|
@MetaMask/metamask-assets (11 files)
@MetaMask/perps (4 files)
@MetaMask/swaps-engineers (2 files)
Unowned (6 files)
|




Description
The
tokenDetailsV2AbTestA/B test (ASSETS-2493) has been fully rolled out — thetreatmentvariant (Token Details V2 layout) is now live for 100% of users. This PR removes all A/B test machinery since thecontrolbranch is permanently dead code.Changes include:
selectTokenDetailsLayoutTestVariantselector and its tests (featureFlagController/tokenDetailsV2/)useTokenDetailsABTesthookcontrollayout branch fromAssetOverviewContent(AssetDetailsActionsconditional render)displayBuyButton,displaySwapsButton, andgoToSwapsprops fromAssetOverviewContent— they were only used by the control branchonOptionsPressfromTokenDetailsInlineHeader— the options button was control-onlyabTestTokenDetailsLayoutparam fromusePerpsActionsand all downstream Perps navigation (PerpsOrderRedirect,PerpsOrderView,navigation.ts)useTokenActions,useTokenDetailsOpenedTracking,useTrackSwapPageViewed, anduseSubmitBridgeTxtokenDetailsV2AbTestfrom the feature flag registry and E2E remote flag mocksabTestContexttype in the Bridge slice anduseSwapBridgeNavigationtoRecord<string, string>for future testshandleBuyPress,handleSellPress,hasEligibleStickySwapTokens, andgoToSwapsexports fromuseTokenActionsand their corresponding testsChangelog
CHANGELOG entry: remove token details v2 flag
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3060
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Mostly deletes A/B test wiring and dead control-path UI, but touches Token Details/Perps navigation params and analytics payloads, which could affect tracking and deep navigation if any callers still pass the removed params.
Overview
Removes the
tokenDetailsV2AbTestrollout machinery and hardens Token Details on the V2 layout path. This deletes the feature-flag selector/hook, strips the legacy control-branch UI (including the header options button), and simplifies Token Details rendering/tests accordingly.It also removes propagation of the
assetsASSETS2493AbtestTokenDetailsLayoutparam through Perps navigation (usePerpsActions→PerpsOrderRedirect/PerpsOrderView/route types) and drops related A/B test properties from swap/bridge and token-details analytics (e.g.,SWAP_PAGE_VIEWED,TOKEN_DETAILS_OPENED, bridge tx submission).Finally,
bridgeA/B test context typing is generalized toRecord<string,string>for future experiments, while current Token Details callers now pass an empty context.Reviewed by Cursor Bugbot for commit 7a3c163. Bugbot is set up for automated code reviews on this repo. Configure here.