Skip to content

fix(ramps): remove Navigation Dev Panel and purge seeded orders cp-7.81.0#31188

Merged
weitingsun merged 2 commits into
mainfrom
wsun/remove-navigation-dev-panel
Jun 8, 2026
Merged

fix(ramps): remove Navigation Dev Panel and purge seeded orders cp-7.81.0#31188
weitingsun merged 2 commits into
mainfrom
wsun/remove-navigation-dev-panel

Conversation

@weitingsun

@weitingsun weitingsun commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes invalid dev-panel-ramps-order traffic hitting the provider's Get Orders by ID endpoint (500s on LIVE).

The Navigation Dev Panel (internal-only, gated by MM_ENABLE_SETTINGS_PAGE_DEV_OPTIONS) seeded a mock Ramps order into persisted RampsController state via addOrder():

providerOrderId: dev-panel-ramps-order
provider.id: paypal
That order persisted across launches. On internal/experimental builds that use the production ramps environment, it reached the provider's live endpoint with an invalid order ID. This started after the ramps seed landed in #31037 (~June 4).

Changes:

  • Remove the Navigation Dev Panel entirely (component, mock params, Developer Options entry, route, and references) so nothing can seed these orders again.
  • Add migration 140 to purge dev-panel sentinel artifacts from affected devices on next launch:
  • RampsController.orders → dev-panel-ramps-order (the incident)
    fiatOrders.orders → dev-panel-aggregator-order, dev-panel-deposit-order, dev-panel-sell-order
  • BridgeStatusController.txHistory / TransactionController.transactions → dev-panel-bridge-tx
    Production users were never affected (dev panel not reachable in prod builds). Migration 140 is a no-op for them and only for RC users.

Changelog

CHANGELOG entry:null

Related issues

Fixes: Test seeding ramp with order ID dev-panel-ramps-order bug for non-production users

Manual testing steps

 Background:
    Given the app is built with MM_ENABLE_SETTINGS_PAGE_DEV_OPTIONS enabled
    And the user has previously opened the Navigation Dev Panel
    And the user navigated to the Ramps Order Details entry in the panel
  
Scenario: Navigation Dev Panel is no longer available
    Given the user opens Settings
    And the user opens Developer Options
    Then the "Open Navigation Dev Panel" button is not shown
    And the NavigationDevPanel route is not registered in the navigator
  
Scenario: Dev panel no longer seeds a mock Ramps order
    Given the user is on Developer Options
    When the user attempts to open the Navigation Dev Panel
    Then the Navigation Dev Panel cannot be opened
    And no new order with providerOrderId "dev-panel-ramps-order" is added to RampsController state

Screenshots/Recordings

n/a

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Large deletion of dev-only UI plus a defensive state migration that filters known sentinel IDs; no production user paths or live payment logic changes.

Overview
Removes the internal Navigation Dev Panel (screen, mock params, Developer Options entry, Routes.NAVIGATION_DEV_PANEL, and MainNavigator registration) so dev tooling can no longer inject mock ramp/fiat/bridge data into persisted state.

Adds redux-persist migration 140 to strip sentinel artifacts on upgrade: dev-panel fiat order IDs, dev-panel-ramps-order in RampsController, and dev-panel-bridge-tx from bridge history and transactions. Includes unit tests; production users with no seeded data are unaffected.

Reviewed by Cursor Bugbot for commit 2555e81. Bugbot is set up for automated code reviews on this repo. Configure here.

The Navigation Dev Panel seeded a mock Ramps order (provider `paypal`,
providerOrderId `dev-panel-ramps-order`) directly into persisted
RampsController state via `addOrder`, along with mock fiat orders and a
bridge transaction. On internal/experimental builds that point at the
production ramps environment, this synthetic order reached the provider's
"Get Orders by ID" endpoint and caused 500s (invalid order ID).

- Remove the NavigationDevPanel feature (component, mock params, settings
  section, route, and all references) so nothing can seed these orders.
- Add migration 140 to scrub the sentinel artifacts (ramps order, the three
  dev-panel fiat orders, and the bridge tx/history) from affected devices on
  next launch. No-op for production users, which never had this data.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 7, 2026

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.

@weitingsun weitingsun self-assigned this Jun 7, 2026
@mm-token-exchange-service mm-token-exchange-service Bot added team-mobile-platform Mobile Platform team INVALID-PR-TEMPLATE PR's body doesn't match template labels Jun 7, 2026
@mm-token-exchange-service mm-token-exchange-service Bot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Jun 7, 2026
@weitingsun weitingsun marked this pull request as ready for review June 7, 2026 19:59
@weitingsun weitingsun requested review from a team as code owners June 7, 2026 19:59
@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jun 7, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (global-infrastructure-change): Global infrastructure changed: app/store/migrations/140.test.ts, app/store/migrations/140.ts, app/store/migrations/index.ts. Running all tests.

Performance Test Selection:
Hard rule (global-infrastructure-change): Global infrastructure changed: app/store/migrations/140.test.ts, app/store/migrations/140.ts, app/store/migrations/index.ts. Running all tests.

View GitHub Actions results

@weitingsun weitingsun enabled auto-merge June 8, 2026 17:23
@weitingsun weitingsun added this pull request to the merge queue Jun 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 8, 2026
@weitingsun weitingsun added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 59970c9 Jun 8, 2026
118 of 119 checks passed
@weitingsun weitingsun deleted the wsun/remove-navigation-dev-panel branch June 8, 2026 18:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.82.0 Issue or pull request that will be included in release 7.82.0 label Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.82.0 Issue or pull request that will be included in release 7.82.0 risk:low AI analysis: low risk size-XL team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants