[pull] main from MetaMask:main#529
Merged
Merged
Conversation
…d cp-7.66.0 (#26131) ## **Description** When users changed the Perps order type from "Market" to "Limit" in the dropdown, it reverted back to "Market" after a few seconds. **Reason for the change:** The form state is restored from "pending config" (saved when leaving the order screen) so returning within 5 minutes restores amount, leverage, order type, etc. The restore effect ran whenever `pendingConfig` from Redux was truthy. If `pendingConfig` was missing on first run (e.g. first visit or expired) and appeared later (e.g. state rehydration or async load), the effect would run and overwrite the form with the saved config (often `orderType: 'market'`), undoing the user’s in-session choice of Limit. **Improvement/solution:** Restore from pending config only when it was already available on the first effect run. A ref `skippedRestoreBecausePendingConfigWasFalsy` is set when the effect runs with `pendingConfig` falsy. If `pendingConfig` becomes truthy later, we skip restore so the user’s current form choices (e.g. Limit) are not overwritten. Restore still works when the user returns to the screen with an existing valid pending config. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed Perps order type reverting from Limit back to Market shortly after selection. ## **Related issues** Jira Issue: https://consensyssoftware.atlassian.net/browse/TAT-2574 ## **Manual testing steps** ```gherkin Feature: Perps order type selection Scenario: user selects Limit order and it stays selected Given user is on the Perps order screen (Market or asset view) When user opens the order type dropdown and selects "Limit" Then the order type remains "Limit" and does not revert to "Market" after a few seconds ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/43042398-51e0-40a1-86f8-827b9f02659c ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Small, localized change to a single `useEffect` dependency/trigger; main risk is missing a desired restore when `pendingConfig` is loaded after first mount. > > **Overview** > Fixes Perps order form state restoration so saved `pendingConfig` is applied **only once on mount** instead of re-applying whenever `pendingConfig` becomes available. > > This prevents late Redux rehydration/async updates from overwriting in-session user edits (notably `type` switching from Limit back to Market), by changing the restore `useEffect` to run with an empty dependency array and skipping updates when `pendingConfig` is initially falsy (with an explicit eslint disable for `react-hooks/exhaustive-deps`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d34d97d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
When MockServerE2E.stop() calls mockttp's server.stop(), the underlying
destroyable-server immediately destroys all TCP connections. Any
IncomingMessage whose body is being streamed through mockttp's
streamToBuffer (in buffer-utils.ts) gets its stream aborted, causing the
buffer promise to reject with Error('Aborted'). Jest catches these as
unhandled promise rejections and fails the entire test suite with "Test
suite failed to run".
The existing _shuttingDown flag and _waitForActiveRequests() from PR
#25943 prevent most cases, but there's a race window: requests that have
entered mockttp's internal pipeline (where CallbackHandler.handle()
calls waitForCompletedRequest to buffer the body) but haven't yet
reached our callback (so _activeRequests hasn't been incremented). This
is especially common when skipReactNativeReload: true because the app
keeps polling APIs during teardown.
**The Fix:**
The new _stopServerSuppressingAbortErrors() method wraps _server.stop()
with a temporary unhandledRejection handler filter that:
1. Snapshots all current unhandledRejection handlers (including Jest's)
2. Replaces them with a filter that suppresses Error('Aborted')
rejections (calling promise.catch(() => {}) to mark them as handled) and
forwards all other rejections to the original handlers
3. Calls _server.stop()
4. Waits 150ms for any late 'aborted' events that fire asynchronously
after stop() resolves
5. Restores the original handlers
Note:
This is scoped exclusively to the shutdown window and only suppresses
the specific "Aborted" errors from mockttp's streamToBuffer -- all other
unhandled rejections are forwarded to Jest normally.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
N/A
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
N/A
<!-- [screenshots/recordings] -->
### **After**
N/A
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches global process-level `unhandledRejection` handling, which can
mask or reroute errors if the filter is too broad or restoration misses
edge cases, though it’s scoped to shutdown and filters by error + stack.
>
> **Overview**
> Prevents flaky E2E teardown failures by wrapping `mockttp` shutdown
with a temporary `process.on('unhandledRejection')` filter that
**suppresses only mockttp-originated `Error('Aborted')` rejections**
during `MockServerE2E.stop()`.
>
> `stop()` now calls a new `_stopServerSuppressingAbortErrors()` helper
that snapshots and restores existing `unhandledRejection` handlers
(preserving handlers added during the shutdown window), forwards
non-matching rejections to the originals, and adds a short post-`stop()`
drain delay before restoring handlers.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
67781fb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…26147) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The mUSD bonus claiming experience has been moved to the token list item flow (via a custom confirmation page). This PR removes the now-obsolete bonus reward section from `AssetOverview` / `TokenDetails` and the "Claim on Linea" bottom sheet that was part of that old flow. **What was removed:** - `MerklRewards` component (composed of `PendingMerklRewards` + `ClaimMerklRewards`) rendered in `AssetOverview` and `AssetOverviewContent` - `ClaimOnLineaBottomSheet` component and its navigation route (`ClaimOnLineaModal`) - Associated styles, tests, locale keys (`asset_overview.merkl_rewards.*`), and analytics constants (`ASSET_OVERVIEW`, `CLAIM_BONUS_BOTTOM_SHEET` event locations) **What was kept** (still used by token list items and confirmations): - `merkl-client.ts` (API + caching) - `constants.ts` (ABIs, addresses, origins) - `useMerklRewards`, `useMerklClaim`, `usePendingMerklClaim` hooks - `MerklClaimHandler` headless component ## **Changelog** CHANGELOG entry: Removed bonus reward section from asset overview in favor of the token list claiming flow ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Bonus section removed from AssetOverview Scenario: user opens asset details for an mUSD-eligible token Given the user holds mUSD on Ethereum or Linea And the Merkl campaign claiming feature flag is enabled When user navigates to the asset overview for mUSD Then the "Claimable bonus" section is NOT displayed And the "Claim" button is NOT displayed Scenario: user can still claim from token list item Given the user holds mUSD with a claimable bonus When user taps the "Claim bonus" on mUSD token list item Then the claim flow through the custom confirmation page still works as expected ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Primarily removes UI/routes and strings; remaining behavior changes are limited to analytics tracking on token-list claim presses and a small, well-tested abort-signal compatibility fix in `merkl-client`. > > **Overview** > Removes the **mUSD/Merkl rewards section from asset details** by deleting `MerklRewards` UI (pending/claim components), its tests/styles/locale strings, and the `ClaimOnLineaBottomSheet` modal route (`Routes.MODAL.CLAIM_ON_LINEA`) from navigation. > > Updates token details screens to drop the `isMerklCampaignClaimingEnabled` prop/flag wiring and stops rendering Merkl rewards in `AssetOverview`/`AssetOverviewContent`. > > Keeps Merkl claiming via token list items and **adds analytics tracking** on “Claim bonus” presses in `TokenListItem`/`TokenListItemV2`. Also hardens `merkl-client` by replacing `AbortSignal.throwIfAborted()` with a Hermes-compatible helper and adds coverage for abort behavior during cached/deduped fetches. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 15dfd54. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR aims to stabilize the BTC no funds test as there is a race condition between the load of the BTC snap and the token Tap. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** N/A ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A <!-- [screenshots/recordings] --> ### **After** N/A <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test-only change that adds an explicit UI ready-state wait to reduce flakiness; low impact outside the affected Detox smoke test flow. > > **Overview** > Stabilizes the BTC “insufficient funds” smoke test by waiting for the `Bitcoin` token row to reach a ready (visible/settled) state before tapping. > > Adds `WalletView.waitForTokenToBeReady()` (wrapping `Utilities.waitForReadyState`) and updates `send-btc-token.spec.ts` to use it, reducing race conditions while the token/snap UI finishes loading. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ac1764c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR adds component view tests covering two previously untested network-related regressions (#25100, #24972) ### What changed AssetDetails CVT (#25100) — A production regression was found in 7.61.6, where the token details page was pulling the network name from the globally selected network instead of the token's own chainId from route params. The existing unit tests never set up a cross-chain mismatch (e.g., viewing a Polygon token while Mainnet is selected), so this was not tested. The new CVT renders a Polygon WETH token against a Mainnet-selected state and asserts that "Polygon" appears in both the header and body, while "Ethereum Main Network" doesn't appear at all. WalletActions CVT (#24972) — Was a regression caught during RC testing for 7.62.0, where the Perps button was gated behind isEvmSelected, so it disappeared when the user had a non-EVM network (Solana, Bitcoin, etc.) selected. The existing unit tests mock selectIsEvmNetworkSelected directly and never exercise the false case for Perps. The new CVT sets up real state with isEvmSelected: false and a Solana chain ID, then asserts the Perps button is still in the tree. Both tests were red-green validated: they pass on the current codebase and fail when the respective fixes are reverted. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test-only additions plus new test fixtures/render helpers; no production logic changes, with minimal risk beyond potential test flakiness from fixture assumptions. > > **Overview** > Adds component-view regression tests for two network-selection issues: `AssetDetails` now has coverage ensuring the displayed network name is derived from the token `chainId` in route params (e.g., Polygon token while Mainnet is selected), and `WalletActions` has coverage ensuring the Perps button remains visible when a non-EVM network is selected. > > Introduces reusable component-view test helpers: new state presets (`initialStateAssetDetails`, `initialStateWalletActions`) and renderers (`renderAssetDetailsView`, `renderWalletActionsView`) that build minimal fixtures (including Polygon network config, deterministic fiat rate overrides, and feature-flag enablement for Perps) to make these scenarios easy to reproduce in tests. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 30d9e1e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR cleans and removes unused files related to Appwright. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1455 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A <!-- [screenshots/recordings] --> ### **After** N/A <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Deletes an unused test utility and a corresponding unused import; no production logic changes. > > **Overview** > Removes the unused `splitAmountIntoDigits` helper (by deleting `tests/framework/utils/Utils.js`) and drops its now-stale import from `wdio/screen-objects/BridgeScreen.js` to reduce dead Appwright test code. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bf74950. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR introduces a comprehensive TypeScript type definition file (`Params.ts`) for navigation parameters in the MetaMask Mobile app. **Reason for the change:** Navigation in React Native apps using React Navigation benefits greatly from strong typing. Currently, route parameters are loosely typed, which can lead to runtime errors when passing incorrect or missing parameters between screens. **Improvement/Solution:** - Created `app/constants/navigation/Params.ts` with ~1,267 lines of type definitions - Defines `RouteParams` interface that mirrors the structure of `Routes.ts` - Provides 80+ individual parameter interfaces for specific routes (e.g., `BrowserParams`, `StakeParams`, `BridgeParams`) - Includes utility types like `GetRouteParams<T>` for easy type extraction - Exports `RootStackParamList` for React Navigation compatibility - Covers all major navigation flows: Ramp, Deposit, Bridge, Perps, Predict, Staking, Earn, Card, Notifications, and more ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: #23762 ## **Manual testing steps** Feature: Navigation parameter types Scenario: Developer uses typed navigation parameters Given the developer imports types from app/constants/navigation/Params.ts When the developer navigates to a typed route Then TypeScript provides autocomplete for valid parameters And TypeScript shows errors for invalid or missing required parameters## **Screenshots/Recordings** ### **Before** N/A - This is a new type definition file (no visual changes) ### **After** N/A - This is a TypeScript type file only, no runtime or visual changes ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Type-only refactor that centralizes navigation parameter definitions; risk is limited to potential TS build/type regressions or mismatched param shapes where routes are wired. > > **Overview** > Adds a new `app/core/NavigationService/types.ts` that defines a flattened `RootStackParamList` and globally registers it with React Navigation for type-safe `navigate`/route params across the app. > > Extracts and centralizes many route param interfaces into dedicated `*.types.ts` files (Bridge, Ramp, Earn, Stake, Card, Send, Modals, Multichain, etc.), and updates existing screens to export their param types (e.g., Ramp `BuildQuoteParams`, `OrderDetailsParams`, Deposit `KycWebviewModalParams`) and re-export webview params for compatibility. Also refactors Predict navigation to use named param interfaces instead of inline route param objects. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 840af66. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )