Skip to content

feat: Perps list display#17078

Merged
gambinish merged 100 commits into
mainfrom
feat/perps-list-display
Jul 22, 2025
Merged

feat: Perps list display#17078
gambinish merged 100 commits into
mainfrom
feat/perps-list-display

Conversation

@gambinish

Copy link
Copy Markdown
Member

Description

Based of of initial draft here: #17070 and rebased to final feature branch for perps.

This adds a view to explore Perps Markets in a list form, including a search bar to filter results by.

Changelog

CHANGELOG entry: Add Perpetual Markets List

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Screen.Recording.2025-07-10.at.10.47.44.AM.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

abretonc7s and others added 30 commits July 8, 2025 16:50
Add a new "Perps" wallet action to validate @deeeed/hyperliquid-node20 SDK integration.
Implements TAT-1202 with minimal changes following MetaMask design patterns.

Key features:
- Feature flag controlled via RemoteFeatureFlagController ("perps-enabled")
- Test screen with SDK connectivity validation (HTTP, WebSocket, asset listing)
- Proper polyfills for WebSocket support in React Native
- Team ownership via CODEOWNERS

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive PerpsController with protocol-agnostic API
- Implement HyperLiquidProvider with proper WebSocket lifecycle management
- Add navigation monitoring hook for automatic connect/disconnect
- Integrate WebSocket cleanup when leaving Perps routes
- Add deposit flow views with real MetaMask pricing integration
- Fix TypeScript errors and optimize React hooks for performance
- Implement proper asyncDispose pattern for WebSocket connections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread app/components/UI/Perps/Views/PerpsMarketListView/PerpsMarketListView.types.ts Outdated
Comment thread app/components/UI/Perps/Views/PerpsView.tsx
Comment thread app/components/UI/Perps/controllers/types/index.ts Outdated
Comment thread app/components/UI/Perps/hooks/usePerpsMarkets.ts Outdated
Comment thread app/components/UI/Perps/utils/marketDataTransform.ts
Comment thread app/components/UI/Perps/Views/PerpsView.tsx Outdated
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@nickewansmith nickewansmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gambinish gambinish enabled auto-merge July 21, 2025 20:43
@gambinish gambinish dismissed abretonc7s’s stale review July 21, 2025 20:43

Addressed comments

@gambinish gambinish removed the request for review from abretonc7s July 21, 2025 20:43

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Indexing in Market Data Transformation

The transformMarketData function incorrectly uses universe.indexOf(asset) to find the corresponding assetCtx within a map iteration. This is inefficient and potentially unreliable due to reliance on object reference equality or the presence of duplicate assets. Since universe and assetCtxs are parallel arrays, the index parameter from the map function should be used instead.

app/components/UI/Perps/utils/marketDataTransform.ts#L26-L35

return universe.map((asset) => {
const symbol = asset.name;
const currentPrice = parseFloat(allMids[symbol]);
// Find matching asset context for additional data
// Note: assetCtxs array from metaAndAssetCtxs might have different structure
// The array index should correspond to the universe array index
const assetCtx = assetCtxs[universe.indexOf(asset)];

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@sonarqubecloud

Copy link
Copy Markdown

@gambinish gambinish added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 4f751a4 Jul 22, 2025
43 of 44 checks passed
@gambinish gambinish deleted the feat/perps-list-display branch July 22, 2025 13:38
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2025
@metamaskbot metamaskbot added the release-7.53.0 Issue or pull request that will be included in release 7.53.0 label Jul 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.53.0 Issue or pull request that will be included in release 7.53.0 team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants