Skip to content

fix(perps): prevent rate limit exhaustion during rapid market switching cp-7.72.0#28176

Merged
abretonc7s merged 8 commits intomainfrom
feature/metamask-metamask-mobile-28141
Apr 1, 2026
Merged

fix(perps): prevent rate limit exhaustion during rapid market switching cp-7.72.0#28176
abretonc7s merged 8 commits intomainfrom
feature/metamask-metamask-mobile-28141

Conversation

@abretonc7s
Copy link
Copy Markdown
Contributor

@abretonc7s abretonc7s commented Mar 31, 2026

Description

Fixes HyperLiquid rate limit exhaustion (1200 weight/min) during rapid market switching. Three root causes:

  1. Leaked WebSocket subscriptionsactiveAssetCtx, bbo, assetCtxs, and dexAllMids subscription promises that resolved after cleanup created orphan subscriptions. Fixed with race guards in .then() handlers that check if a newer subscription already exists.
  2. Uncancelled REST callscandleSnapshot REST calls (~22 weight each) continued in-flight after navigation. Fixed with AbortController in subscribeToCandles.
  3. Excessive candle fetch size — Every market visit fetched 500 candles (YearToDate). Reduced to OneWeek for cold cache (~168 candles) and OneDay for revisits (~24 candles). Full history loads on chart scroll via lazy-load.
  4. No candle connection debounce — Candle WS subscriptions fired immediately on mount. Added 500ms debounce (PERFORMANCE_CONFIG.CandleConnectDebounceMs) so rapid switches cancel the timer before the subscription fires.

Changelog

CHANGELOG entry: Fixed rate limit errors when quickly switching between markets in the Perps trading view

Related issues

Fixes: #28141

Manual testing steps

Feature: Perps market switching rate limits

  Scenario: User browses multiple markets without rate limit errors
    Given the user is on the Perps Markets list

    When user taps BTC, waits briefly, goes back, taps ETH, waits, goes back,
         and repeats for SOL and HYPE
    Then no "429 Too Many Requests" errors appear in logs
    And chart data loads for each market visited

  Scenario: User rapidly switches markets
    Given the user is on the Perps Markets list

    When user quickly taps through 4+ markets spending <1s on each
    Then candle subscriptions are debounced (no chart flicker)
    And stale subscriptions are cleaned up (no leak accumulation)

Screenshots/Recordings

Before

429 errors after 3-4 market switches, chart subscription failures, leaked WebSocket subscriptions accumulating.

After

8 market switches with zero 429 errors (recipe: 28/28 pass). Stale subscriptions cleaned up automatically.

Validation Recipe (8 rapid market switches)
{
  "title": "Validate rate limit fix - rapid market switching (#28141)",
  "initial_conditions": { "testnet": false },
  "validate": {
    "runtime": {
      "steps": [
        { "id": "nav_perps", "action": "navigate", "target": "PerpsTrendingView" },
        { "id": "wait_list", "action": "wait_for", "test_id": "perps-market-row-item-BTC", "timeout": 10000 },
        { "id": "open_btc", "action": "press", "test_id": "perps-market-row-item-BTC" },
        { "id": "wait_btc", "action": "wait", "ms": 400 },
        { "id": "back_1", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_eth", "action": "press", "test_id": "perps-market-row-item-ETH" },
        { "id": "wait_eth", "action": "wait", "ms": 400 },
        { "id": "back_2", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_sol", "action": "press", "test_id": "perps-market-row-item-SOL" },
        { "id": "wait_sol", "action": "wait", "ms": 400 },
        { "id": "back_3", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_hype", "action": "press", "test_id": "perps-market-row-item-HYPE" },
        { "id": "wait_hype", "action": "wait", "ms": 400 },
        { "id": "back_4", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_btc2", "action": "press", "test_id": "perps-market-row-item-BTC" },
        { "id": "wait_btc2", "action": "wait", "ms": 400 },
        { "id": "back_5", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_eth2", "action": "press", "test_id": "perps-market-row-item-ETH" },
        { "id": "wait_eth2", "action": "wait", "ms": 400 },
        { "id": "back_6", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_sol2", "action": "press", "test_id": "perps-market-row-item-SOL" },
        { "id": "wait_sol2", "action": "wait", "ms": 400 },
        { "id": "back_7", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "open_hype2", "action": "press", "test_id": "perps-market-row-item-HYPE" },
        { "id": "wait_hype2", "action": "wait", "ms": 400 },
        { "id": "back_8", "action": "press", "test_id": "perps-market-header-back-button" },
        { "id": "settle", "action": "wait", "ms": 5000 },
        { "id": "check_fix", "action": "log_watch", "window_seconds": 30,
          "watch_for": ["DEBUG-28141"],
          "must_not_appear": ["429 Too Many Requests", "rate limit", "Rate limit"] }
      ]
    }
  }
}

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.

Note

Medium Risk
Touches Perps streaming/subscription lifecycle (debouncing, retry, and cleanup) and changes initial candle fetch sizing; mistakes could cause missing/late market data or lingering subscriptions, though changes are localized and well-tested.

Overview
Reduces HyperLiquid rate-limit pressure during rapid Perps market switching by debouncing candle WebSocket connects, shrinking initial candle fetch durations, and cancelling in-flight candle snapshot requests on cleanup.

Adds race guards in HyperLiquidSubscriptionService to prevent pending subscription promises (e.g., activeAssetCtx, bbo, assetCtxs, dexAllMids) from becoming orphaned when cleanup happens before they resolve, and updates/expands unit tests to cover deferred connect retries, timer cancellation, abort handling, and stale-subscription cleanup.

Written by Cursor Bugbot for commit 40fa684. This will update automatically on new commits. Configure here.

…ng (#28141)

- Add race guards in .then() handlers for activeAssetCtx, bbo, assetCtxs,
  and dexAllMids subscriptions to detect and clean up stale promises that
  resolve after cleanup
- Add AbortController to cancel in-flight candleSnapshot REST calls on
  navigation away
- Debounce CandleStreamChannel connections (500ms) to prevent WS
  subscription churn during rapid switching
- Reduce initial candle fetch from YearToDate (500) to OneWeek (~168),
  with OneDay (~24) for cached revisits — full history lazy-loads on scroll
- Add PERFORMANCE_CONFIG.CandleConnectDebounceMs constant
@abretonc7s abretonc7s requested a review from a team as a code owner March 31, 2026 15:17
@abretonc7s abretonc7s added type-bug Something isn't working team-perps Perps team labels Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions bot added size-M risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 31, 2026
)

- Add flushConnectDebounce() after subscribe() calls to advance fake
  timers past the 500ms debounce delay
- Update duration assertions: OneWeek for cold cache, OneDay for revisits
- Add test for abort signal suppression in subscribeToCandles
- Add test for cache-hit lighter fetch duration
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 31, 2026
@abretonc7s abretonc7s added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Mar 31, 2026
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.72727% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.64%. Comparing base (35dbfe1) to head (2bf790c).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
...s/perps/services/HyperLiquidSubscriptionService.ts 48.64% 9 Missing and 10 partials ⚠️
...UI/Perps/providers/channels/CandleStreamChannel.ts 58.33% 2 Missing and 3 partials ⚠️
...rollers/perps/services/HyperLiquidClientService.ts 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #28176      +/-   ##
==========================================
+ Coverage   82.55%   82.64%   +0.08%     
==========================================
  Files        4864     4866       +2     
  Lines      125683   126034     +351     
  Branches    28150    28254     +104     
==========================================
+ Hits       103761   104163     +402     
+ Misses      14747    14662      -85     
- Partials     7175     7209      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Automated Review — PR #28176

BETA — Automated review from the farmslot pipeline.

Recommendation APPROVE
Runner unknown / unknown
Tier standard
Cost N/A (N/A tokens)
Recipe N/A

Summary

This PR addresses HyperLiquid rate limit exhaustion (1200 weight/min) during rapid market switching through four targeted fixes: debounced candle WebSocket connections, lighter initial candle fetches (OneWeek/OneDay vs YearToDate), abortable REST calls via AbortController, and race guards on async subscription promises. The fix is well-structured, addresses the root causes, and achieves its stated goal.

Full review details

Prior Reviews

No prior CHANGES_REQUESTED reviews. Only COMMENTED reviews from cursor (bot summary) and abretonc7s.

Acceptance Criteria Validation

# Criterion Status Evidence
1 No 429 errors after 4+ market switches PASS CDP validation: BTC→ETH→SOL→HYPE rapid switching, zero 429 errors in Metro log
2 Chart data loads for each market visited PASS CDP: successfully navigated to HYPE market, candle subscriptions established
3 Candle subscriptions debounced during rapid switching PASS Code review: 500ms debounce via PERFORMANCE_CONFIG.CandleConnectDebounceMs, tests verify
4 Stale subscriptions cleaned up PASS Code review: race guards in .then() handlers, pending promise tracking, abort on cleanup

Code Quality

  • Pattern adherence: Follows codebase conventions. New constant in PERFORMANCE_CONFIG. Uses existing ensureError pattern.
  • Complexity: Appropriate — each fix targets a specific root cause without over-engineering.
  • Type safety: Two minor as Promise<void> casts in HyperLiquidSubscriptionService.ts:2667,3148 (promise chain returns void | undefined). Pragmatic and low-risk.
  • Error handling: AbortError suppression is correct — abort is intentional, not an error.
  • Anti-pattern findings:
    • Hardcoded 200 at CandleStreamChannel.ts:279 duplicates PERFORMANCE_CONFIG.NavigationParamsDelayMs. Minor inconsistency.
    • No magic strings, no console.log, no eslint-disable comments.

Fix Quality

  • Best approach: Yes, this is the correct fix. The four-pronged approach (debounce, lighter fetch, abort, race guards) addresses all identified root causes. A single fix (e.g., only debounce) would not fully solve the problem.
  • Would not ship: Nothing blocking. All changes are shippable.
  • Test quality: Good. Tests verify debounce timing via flushConnectDebounce(), cold/warm cache duration selection, abort error suppression. The abort test specifically verifies that onError is NOT called when abort fires — this is the right assertion.
  • Brittleness: Low. The debounce constant is externalized. The race guard pattern (check subscriber count + existing subscription in .then()) is robust against re-ordering. The as Promise<void> casts are cosmetic.

Live Validation

  • Recipe: skipped (tier: standard)
  • Result: PASS — CDP validation with 4 rapid market switches, zero errors
  • Video: failed (SimulatorError — simulator recording unavailable)
  • Native changes: none
  • Metro errors: none related to PR changes (only pre-existing keychain warnings)
  • Log monitoring: 30s monitored, zero 429/rate-limit errors, clean candle subscription establishment

Correctness

  • Diff vs stated goal: Aligned — all four root causes addressed
  • Edge cases:
    • Covered: rapid away-and-back (pending promise replaced), cleanup during pending subscription, abort during in-flight REST
    • Covered: cache hit vs cold cache for duration selection
    • Covered: reconnection path clears pending promise maps
  • Race conditions: Addressed — the entire PR is about fixing race conditions in async subscription lifecycle
  • Backward compatibility: Preserved — no API changes, internal behavior only

Static Analysis

  • lint:tsc: PASS — 0 errors
  • Tests: 115/115 pass (CandleStreamChannel.test.ts + HyperLiquidClientService.test.ts)

Architecture & Domain

  • HyperLiquidSubscriptionService.ts is at 3,731 lines (exceeds 2,500 hard limit). This PR adds ~50 lines but the file was already over-limit. Recommend planning a split in a follow-up.
  • The debounce + abort + race guard pattern could serve as a reference for other subscription channels if similar issues arise.
  • No controller portability issues — all changes are within the HyperLiquid provider layer.

Risk Assessment

  • [MEDIUM] — Changes core subscription lifecycle logic. However, the race guards are defensive (fail-safe: unsubscribe stale) and the debounce is a well-understood pattern. Tests cover the critical paths.

Recommended Action

[APPROVE]

  • Two minor nitpicks (hardcoded 200, as Promise<void> casts) — neither blocks merge.
  • File size of HyperLiquidSubscriptionService.ts should be tracked for future split.
Line comments (3 comments: 1 suggestion, 2 nitpick)
  • [nitpick] app/components/UI/Perps/providers/channels/CandleStreamChannel.ts:279: Hardcoded 200 duplicates PERFORMANCE_CONFIG.NavigationParamsDelayMs. Consider using the named constant to keep them in sync if the intent is the same delay.
  • [nitpick] app/controllers/perps/services/HyperLiquidSubscriptionService.ts:2667: The as Promise<void> cast is needed because .then() returns void | undefined. Consider adding an explicit return undefined as void; at the end of the .then() chain to avoid the cast, or type the map as Map<string, Promise<void | undefined>>.
  • [suggestion] app/controllers/perps/services/HyperLiquidSubscriptionService.ts:3731: This file is at 3,731 lines — well above the 2,500 line guideline. While this PR only adds ~50 lines, consider planning a split (e.g., extracting market data subscriptions, order book subscriptions, and fills into separate service classes).

No video evidence recorded.

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Automated Review — PR #28176

BETA — Automated review from the farmslot pipeline.

Recommendation APPROVE
Runner unknown / unknown
Tier standard
Cost N/A (N/A tokens)
Recipe N/A

Summary

This PR addresses HyperLiquid rate limit exhaustion (1200 weight/min) during rapid market switching through four targeted fixes: debounced candle WebSocket connections, lighter initial candle fetches (OneWeek/OneDay vs YearToDate), abortable REST calls via AbortController, and race guards on async subscription promises. The fix is well-structured, addresses the root causes, and achieves its stated goal.

Full review details

Prior Reviews

No prior CHANGES_REQUESTED reviews. Only COMMENTED reviews from cursor (bot summary) and abretonc7s.

Acceptance Criteria Validation

# Criterion Status Evidence
1 No 429 errors after 4+ market switches PASS CDP validation: BTC→ETH→SOL→HYPE rapid switching, zero 429 errors in Metro log
2 Chart data loads for each market visited PASS CDP: successfully navigated to HYPE market, candle subscriptions established
3 Candle subscriptions debounced during rapid switching PASS Code review: 500ms debounce via PERFORMANCE_CONFIG.CandleConnectDebounceMs, tests verify
4 Stale subscriptions cleaned up PASS Code review: race guards in .then() handlers, pending promise tracking, abort on cleanup

Code Quality

  • Pattern adherence: Follows codebase conventions. New constant in PERFORMANCE_CONFIG. Uses existing ensureError pattern.
  • Complexity: Appropriate — each fix targets a specific root cause without over-engineering.
  • Type safety: Two minor as Promise<void> casts in HyperLiquidSubscriptionService.ts:2667,3148 (promise chain returns void | undefined). Pragmatic and low-risk.
  • Error handling: AbortError suppression is correct — abort is intentional, not an error.
  • Anti-pattern findings:
    • Hardcoded 200 at CandleStreamChannel.ts:279 duplicates PERFORMANCE_CONFIG.NavigationParamsDelayMs. Minor inconsistency.
    • No magic strings, no console.log, no eslint-disable comments.

Fix Quality

  • Best approach: Yes, this is the correct fix. The four-pronged approach (debounce, lighter fetch, abort, race guards) addresses all identified root causes. A single fix (e.g., only debounce) would not fully solve the problem.
  • Would not ship: Nothing blocking. All changes are shippable.
  • Test quality: Good. Tests verify debounce timing via flushConnectDebounce(), cold/warm cache duration selection, abort error suppression. The abort test specifically verifies that onError is NOT called when abort fires — this is the right assertion.
  • Brittleness: Low. The debounce constant is externalized. The race guard pattern (check subscriber count + existing subscription in .then()) is robust against re-ordering. The as Promise<void> casts are cosmetic.

Live Validation

  • Recipe: skipped (tier: standard)
  • Result: PASS — CDP validation with 4 rapid market switches, zero errors
  • Video: failed (SimulatorError — simulator recording unavailable)
  • Native changes: none
  • Metro errors: none related to PR changes (only pre-existing keychain warnings)
  • Log monitoring: 30s monitored, zero 429/rate-limit errors, clean candle subscription establishment

Correctness

  • Diff vs stated goal: Aligned — all four root causes addressed
  • Edge cases:
    • Covered: rapid away-and-back (pending promise replaced), cleanup during pending subscription, abort during in-flight REST
    • Covered: cache hit vs cold cache for duration selection
    • Covered: reconnection path clears pending promise maps
  • Race conditions: Addressed — the entire PR is about fixing race conditions in async subscription lifecycle
  • Backward compatibility: Preserved — no API changes, internal behavior only

Static Analysis

  • lint:tsc: PASS — 0 errors
  • Tests: 115/115 pass (CandleStreamChannel.test.ts + HyperLiquidClientService.test.ts)

Architecture & Domain

  • HyperLiquidSubscriptionService.ts is at 3,731 lines (exceeds 2,500 hard limit). This PR adds ~50 lines but the file was already over-limit. Recommend planning a split in a follow-up.
  • The debounce + abort + race guard pattern could serve as a reference for other subscription channels if similar issues arise.
  • No controller portability issues — all changes are within the HyperLiquid provider layer.

Risk Assessment

  • [MEDIUM] — Changes core subscription lifecycle logic. However, the race guards are defensive (fail-safe: unsubscribe stale) and the debounce is a well-understood pattern. Tests cover the critical paths.

Recommended Action

[APPROVE]

  • Two minor nitpicks (hardcoded 200, as Promise<void> casts) — neither blocks merge.
  • File size of HyperLiquidSubscriptionService.ts should be tracked for future split.
Line comments (3 comments: 1 suggestion, 2 nitpick)
  • [nitpick] app/components/UI/Perps/providers/channels/CandleStreamChannel.ts:279: Hardcoded 200 duplicates PERFORMANCE_CONFIG.NavigationParamsDelayMs. Consider using the named constant to keep them in sync if the intent is the same delay.
  • [nitpick] app/controllers/perps/services/HyperLiquidSubscriptionService.ts:2667: The as Promise<void> cast is needed because .then() returns void | undefined. Consider adding an explicit return undefined as void; at the end of the .then() chain to avoid the cast, or type the map as Map<string, Promise<void | undefined>>.
  • [suggestion] app/controllers/perps/services/HyperLiquidSubscriptionService.ts:3731: This file is at 3,731 lines — well above the 2,500 line guideline. While this PR only adds ~50 lines, consider planning a split (e.g., extracting market data subscriptions, order book subscriptions, and fills into separate service classes).

No video evidence recorded.

@abretonc7s abretonc7s added the DO-NOT-MERGE Pull requests that should not be merged label Apr 1, 2026
- Replace hardcoded 200ms with PERPS_CONSTANTS.ConnectRetryDelayMs
- Add stale-promise race guard in activeAsset and bbo subscription handlers
- Remove `as Promise<void>` casts by widening map type to `void | undefined`
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
@abretonc7s abretonc7s removed the DO-NOT-MERGE Pull requests that should not be merged label Apr 1, 2026
Cover stale-promise race condition and activeAssetCtx error path
in HyperLiquidSubscriptionService, raising new code coverage to 84%.
@github-actions github-actions bot removed the size-M label Apr 1, 2026
@abretonc7s
Copy link
Copy Markdown
Contributor Author

@abretonc7s will it not have a negative impact on the perceived performance?

Nope, nothing visible really.

@abretonc7s abretonc7s added DO-NOT-MERGE Pull requests that should not be merged and removed DO-NOT-MERGE Pull requests that should not be merged labels Apr 1, 2026
@abretonc7s abretonc7s enabled auto-merge April 1, 2026 11:23
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

michalconsensys
michalconsensys previously approved these changes Apr 1, 2026
@abretonc7s abretonc7s disabled auto-merge April 1, 2026 12:18
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
@abretonc7s abretonc7s enabled auto-merge April 1, 2026 13:57
@github-actions github-actions bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: @PerformancePreps
  • Risk Level: medium
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 7 changed files are exclusively within the Perps feature domain. The changes fix race conditions and rate limit exhaustion during rapid market switching (#28141):

  1. HyperLiquidClientService.ts: Adds AbortSignal/AbortController to cancel in-flight candleSnapshot REST calls on cleanup, preventing rate limit exhaustion.
  2. HyperLiquidSubscriptionService.ts: Adds pending promise tracking maps for activeAsset and BBO subscriptions to prevent subscription leaks when cleanup fires before async subscriptions resolve. Also fixes race conditions in allMids and assetCtxs subscriptions.
  3. CandleStreamChannel.ts: Refactors connect() to always defer via 500ms debounce (new CandleConnectDebounceMs constant), splits into connect() (schedules) and connectNow() (executes). Changes initial fetch duration from YearToDate to OneWeek (or OneDay on cache hit) to conserve rate limit budget. Adds clearCache() override to cancel deferred timers.
  4. perpsConfig.ts: Adds CandleConnectDebounceMs: 500 constant.
  5. Test files: Updated to account for new debounce behavior.

SmokePerps is the primary tag as these changes directly affect perps trading functionality (candle chart data, market data subscriptions, order book subscriptions). Per SmokePerps tag description, SmokeWalletPlatform (Trending section) and SmokeConfirmations (Add Funds on-chain transactions) must also be selected. No other feature areas are impacted - no shared components, navigation, Engine, or other controllers were modified.

Performance Test Selection:
The changes include a significant optimization to candle data fetching: initial fetch duration changed from YearToDate (up to 500 candles) to OneWeek (lighter fetch) or OneDay (on cache hit). This directly impacts perps market loading performance. The 500ms debounce on connect() also affects subscription timing. @PerformancePreps covers perps market loading, position management, add funds flow, and order execution - all of which are affected by these subscription and data fetching changes.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@abretonc7s abretonc7s added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit fcbef75 Apr 1, 2026
99 of 101 checks passed
@abretonc7s abretonc7s deleted the feature/metamask-metamask-mobile-28141 branch April 1, 2026 21:50
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2026
@metamaskbot metamaskbot added the release-7.73.0 Issue or pull request that will be included in release 7.73.0 label Apr 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.73.0 Issue or pull request that will be included in release 7.73.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-L skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-perps Perps team type-bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Perps rate limit issue when discovering 5-10 markets

5 participants