fix: inlude hip3 categorization on perps market list cp-13.29.0#42170
Conversation
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (2 files, +63 -20)
|
Builds ready [7cc2642]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [afd943f]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
geositta
left a comment
There was a problem hiding this comment.
Since this relies on the controller/data layer continuing to limit which HIP-3 markets reach the UI when the feature flag state is incomplete, should we have an integration test at that boundary?
Builds ready [54d3c28]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [fa6d106]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|


Description
The Stocks, Commodities, and Forex tabs in the perps market list were rendering empty even though HIP-3 markets were visible and tradable under "All".
The filter was gating each category on isHip3Market(m, allowedHip3Sources), where allowedHip3Sources comes from the perpsHip3AllowlistMarkets LaunchDarkly flag. The UI-side selector defaults to an empty set when the flag hasn't loaded yet — so every market failed the allowlist check, leaving all three category tabs blank.
Meanwhile, the background controller has a hardcoded fallbackHip3AllowlistMarkets: ['xyz:*'], which is why the markets appear tradable under "All" but disappear when a category filter is selected.
Fix:
Remove the isHip3Market gate from the stocks, commodities, and forex filter cases. These tabs now filter purely on the resolved marketType (equity, commodity, forex), which is already correctly populated by the controller's transformMarketData.
This is safe because:
The controller's own allowlist already controls which HIP-3 markets reach the UI — re-checking it in the UI filter is redundant and produces a false negative when the flag is empty.
getResolvedMarketType returns undefined for crypto and unmapped markets, so no non-HIP-3 markets can bleed through.
The all, crypto, and new tab logic is unchanged.
Changelog
CHANGELOG entry: fixes bug where hip3 assets weren't discoverable in search
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-3096
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-04-27.at.10.31.04.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes market-category filtering logic for perps, which can affect what markets are surfaced to users if market typing or controller gating is incorrect. Added tests reduce risk by asserting both UI behavior when the LaunchDarkly allowlist flag is missing and that the controller fallback allowlist remains non-empty.
Overview
Fixes the perps market list category tabs (Stocks/Commodities/Forex) rendering empty when the
perpsHip3AllowlistMarketsremote feature flag hasn’t loaded.The UI filter now categorizes these tabs only by resolved market type (equity/commodity/forex) instead of additionally gating on the allowlist set; the allowlist is still used for the "New" tab. New tests cover category tab rendering with the flag absent and add a guard asserting
PerpsControllerInitalways wires a non-emptyfallbackHip3AllowlistMarketsso HIP-3 markets are gated before LaunchDarkly responds.Reviewed by Cursor Bugbot for commit fa6d106. Bugbot is set up for automated code reviews on this repo. Configure here.