fix(perps): Adjust incorrect market categories#27910
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. |
Bug Fix Report — TAT-2499SummaryURNM (Sprott Uranium Miners ETF) was incorrectly categorised as an equity/stock, causing it to appear under the Stocks filter tab instead of Commodities. USAR (a US equity fund) was incorrectly categorised as a commodity, causing it to appear under the Commodities tab instead of Stocks. Two character-level value corrections in the Root CauseFile: Lines 343 and 358 in the Data flow: Reproduction CommitSHA: Metro log excerpt (pre-fix — bug confirmed): Metro log excerpt (post-fix — correct): Changes
Test PlanAutomated
Manual GherkinFeature: Market category filter tabs
Scenario: URNM appears under Commodities
Given I am on the Perps market list
When I tap the "Commodities" filter tab
Then URNM should appear in the list
And URNM should display a COMMODITY badge
Scenario: USAR appears under Stocks
Given I am on the Perps market list
When I tap the "Stocks" filter tab
Then USAR should appear in the list
And USAR should display a STOCK badge
Scenario: URNM does not appear under Stocks
Given I am on the Perps market list
When I tap the "Stocks" filter tab
Then URNM should NOT appear in the list
Scenario: USAR does not appear under Commodities
Given I am on the Perps market list
When I tap the "Commodities" filter tab
Then USAR should NOT appear in the listEvidence
Ticket |
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.
Fixes section comment mismatch flagged by cursor[bot] (comment #2987753819). URNM (commodity) was listed among equity entries; USAR (equity) was listed under the commodities section comment. Moved both to their correct sections.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
A new unit test file (hyperLiquidConfig.test.ts) was added to verify these classifications. These are data-only corrections with no structural, API, or UI changes. The constants are used by HyperLiquidProvider.ts for market type classification in the Perps feature. SmokePerps is selected as the primary tag since this directly affects Perps market data. Per SmokePerps tag dependencies, SmokeWalletPlatform (Trending section embeds Perps) and SmokeConfirmations (Add Funds deposits are on-chain transactions) are also required. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
URNM(Sprott Uranium Miners ETF) was listed as'equity'inHIP3_ASSET_MARKET_TYPESwhen it should be'commodity', andUSAR(US equity fund) was listed as'commodity'when it should be'equity'. This caused both instruments to appear under the wrong filter tab and display the wrong badge. Fixed by correcting the two values in the config constant — the single source of truth for HIP-3 market classification.Changelog
CHANGELOG entry: Fixed incorrect market category assignments for URNM (now Commodity) and USAR (now Stock) in the Perps market list.
Related issues
Fixes: TAT-2499
Manual testing steps
Screenshots/Recordings
Before
See .task/fix/tat-2499-0325-1917/artifacts/before.mp4
After
See .task/fix/tat-2499-0325-1917/artifacts/after.mp4
Validation Recipe
Automated validation recipe (validate-recipe.sh)
{ "pr": "27910", "title": "URNM and USAR market categories corrected", "jira": "TAT-2499", "acceptance_criteria": [ "URNM is categorised as commodity (not equity)", "USAR is categorised as equity/stock (not commodity)", "Fix is at the config layer, not UI layer" ], "validate": { "static": ["yarn lint:tsc"], "runtime": { "pre_conditions": ["wallet.unlocked", "perps.feature_enabled"], "steps": [ { "id": "nav-market-list", "description": "Navigate to market trending list", "action": "navigate", "target": "PerpsTrendingView" }, { "id": "wait-market-list", "description": "Wait for market list route to be active", "action": "wait_for", "route": "PerpsTrendingView" }, { "id": "assert-urnm-is-commodity", "description": "Assert URNM has marketType=commodity in controller state (the fix)", "action": "eval_async", "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(markets){var urnm=markets.find(function(market){return market.symbol==='xyz:URNM'});return JSON.stringify({found:!!urnm,marketType:urnm?urnm.marketType:null})})", "assert": { "operator": "eq", "field": "marketType", "value": "commodity" } }, { "id": "assert-usar-is-equity", "description": "Assert USAR has marketType=equity in controller state (the fix)", "action": "eval_async", "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(markets){var usar=markets.find(function(market){return market.symbol==='xyz:USAR'});return JSON.stringify({found:!!usar,marketType:usar?usar.marketType:null})})", "assert": { "operator": "eq", "field": "marketType", "value": "equity" } }, { "id": "nav-commodities-filter", "description": "Select Commodities filter tab to verify URNM appears there", "action": "flow_ref", "ref": "market-discovery", "params": { "symbol": "xyz:URNM", "category": "commodities" } }, { "id": "assert-urnm-badge-commodity", "description": "Verify URNM badge shows commodity type in market detail", "action": "eval_async", "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(markets){var urnm=markets.find(function(market){return market.symbol==='xyz:URNM'});return JSON.stringify({found:!!urnm,marketType:urnm?urnm.marketType:null,isHip3:urnm?urnm.isHip3:null})})", "assert": { "operator": "eq", "field": "marketType", "value": "commodity" } }, { "id": "nav-stocks-filter", "description": "Select Stocks filter tab to verify USAR appears there", "action": "flow_ref", "ref": "market-discovery", "params": { "symbol": "xyz:USAR", "category": "stocks" } }, { "id": "assert-usar-badge-equity", "description": "Verify USAR badge shows equity type in market detail", "action": "eval_async", "expression": "Engine.context.PerpsController.getMarketDataWithPrices().then(function(markets){var usar=markets.find(function(market){return market.symbol==='xyz:USAR'});return JSON.stringify({found:!!usar,marketType:usar?usar.marketType:null,isHip3:usar?usar.isHip3:null})})", "assert": { "operator": "eq", "field": "marketType", "value": "equity" } }, { "id": "screenshot-final", "description": "Capture final state for human review", "action": "screenshot", "filename": "after-fix-usar-in-stocks" } ] } } }Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: updates two static
HIP3_ASSET_MARKET_TYPESentries and adds a small unit test to prevent regressions; no runtime logic or security-sensitive code changes.Overview
Fixes HIP-3 perps market classification by swapping the
HIP3_ASSET_MARKET_TYPESmappings forxyz:URNM(nowcommodity) andxyz:USAR(nowequity), which affects filter tabs and badges.Adds
hyperLiquidConfig.test.tsto assert correct market-type mappings for these symbols and a few representative equity/commodity/forex entries.Written by Cursor Bugbot for commit 066edfa. This will update automatically on new commits. Configure here.