[pull] main from MetaMask:main#504
Merged
Merged
Conversation
## **Description**
The `isActiveSrc` and `isActiveDest` properties on the `chains` feature
flag are being deprecated. If a chain exists in the `chainRanking`
array, it is now assumed to be enabled as both source and destination.
This PR migrates all selectors that previously checked
`chains[chainId].isActiveSrc` / `chains[chainId].isActiveDest` to
instead check for the chain's presence in `chainRanking`.
This eliminates a pain point where adding a new network required an
entry in both `chainRanking` and `chains` — now `chainRanking` is the
single source of truth for whether a network is enabled.
**Changes:**
- `selectIsBridgeEnabledSourceFactory` — checks `chainRanking` presence
instead of `chains[chainId].isActiveSrc`
- `selectEnabledSourceChains` — same migration
- Removed `selectEnabledDestChains`, `selectIsBridgeEnabledDest`, and
`selectIsSwapsLive` selectors (no longer needed with the new model)
- Removed unused imports (`PopularList`,
`selectHasCreatedSolanaMainnetAccount`)
- Updated tests to match new behavior: disabling a chain means removing
it from `chainRanking`
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Bridge chain enablement via chainRanking
Scenario: user opens swap/bridge for a supported network
Given the user has a wallet with tokens on Ethereum Mainnet
When user opens the swap or bridge view
Then Ethereum Mainnet is available as a source network
Scenario: user opens swap/bridge for a network not in chainRanking
Given the user has a wallet on a network not listed in chainRanking
When user opens the swap or bridge view
Then that network is not available as a source network
Scenario: user selects destination token on a newly added network
Given a new network has been added to chainRanking
When user opens the bridge token selector for destination
Then the new network appears and its default destination token loads correctly
```
## **Screenshots/Recordings**
Not applicable — no UI changes.
### **Before**
N/A
### **After**
N/A
## **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**
> Changes core selector logic that gates which networks appear/enabled
for bridge/swap, and removes selectors that may have downstream callers
if not fully migrated.
>
> **Overview**
> Switches bridge/swap network enablement checks to rely solely on
feature-flag `chainRanking` membership, replacing deprecated
`chains[caipId].isActiveSrc/isActiveDest` lookups.
>
> Removes destination/live enablement selectors
(`selectEnabledDestChains`, `selectIsBridgeEnabledDest`,
`selectIsSwapsLive`) and related imports, and updates unit tests to
reflect the new behavior (a chain is disabled by removing it from
`chainRanking`, and unknown chains now return `false` rather than
`undefined`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f9591fd. 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** Add deeplink support to open the network picker modal from the home screen. This allows users to directly open the network selection modal via a universal link to the home screen, improving navigation flow for network-specific actions. Deeplink: https://link.metamask.io/home?openNetworkSelector=true ## **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: feat: add network picker deeplink ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2571 ## **Manual testing steps** 1. Generate a link that a user can click (or spin up inside bash command) 2. "Click" network picker deeplink 3. EXPECTED - should open home screen and network deeplink ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://www.loom.com/share/53a5b4ea0e4245be85f8c96d4871a351 ## **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. --- <a href="https://cursor.com/background-agent?bcId=bc-126b3cd2-5a62-4ebc-9054-8ac666811dd2"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> <a href="https://cursor.com/agents?id=bc-126b3cd2-5a62-4ebc-9054-8ac666811dd2"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes wallet home focus-time navigation behavior and relies on delayed `setParams` timing/param clearing, which could cause unexpected navigation or regress existing deeplink flows if route params aren’t shaped as expected. > > **Overview** > Adds support for `home?openNetworkSelector=true` deeplinks by navigating to `Routes.WALLET.HOME` and then (after a delay) setting `openNetworkSelector` via `NavigationService.navigation.setParams`. > > Refactors wallet home deeplink handling into a new `useHomeDeepLinkEffects` hook that runs on screen focus, performs delayed actions (select Perps tab or open the network selector modal), and clears consumed deeplink params by setting them to `null`. Updates/extends unit tests and deeplink docs to cover the new parameter and hook behavior. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0220ffb. 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** <!-- 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? --> This PR updates 3 E2E tests to be BIP-44 compliant, 1. Delete account 2. Add account 3. Reveal SRP from account details ## **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` 4. 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: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1442 ## **Manual testing steps** No applicable ## **Screenshots/Recordings** No applicable ## **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 changes plus new fixture data; main risk is E2E brittleness from updated account ordering, indices, and hardcoded SRP strings. > > **Overview** > Updates multichain E2E smoke tests to use new **BIP-44/multichain-compliant fixtures** and V2 account-details navigation, reducing reliance on feature-flag mocks and bespoke UI flows. > > Adds two new `FixtureBuilder` presets for (1) an HD keyring + imported simple-key-pair account and (2) two HD keyrings, then rewires the **delete account**, **add account to SRP**, and **export SRP from account actions** tests to use these fixtures, updated account indices, and the newer SRP reveal entry point (`tapAccountSrpLink`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5fe4e66. 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**
Move component view tests to the required jobs list
<!--
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**
```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]
> **Medium Risk**
> CI gating changes can block merges if `component-view-test` is flaky
or misconfigured, but no production/runtime code paths are affected.
>
> **Overview**
> Makes `component-view-test` a required dependency for the
`all-jobs-pass` job in `.github/workflows/ci.yml`, so PRs only pass the
overall CI gate when component view tests run and succeed.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fe35763. 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** Following #24313 we're looking to centralize all tools and test resources in one place. This PR also: - moves E2E specific `selectors` to `/tests` Previous related PRs: - #24988 - #24313 - #25031 - #25095 - #25167 - #25198 - #25219 - #25263 - #25279 - #25520 - #25533 - #25598 - #25636 - #25638 - #25698 - #25706 <!-- 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-1235 ## **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 - [ ] 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 import-path and file-location changes for test-only code; main risk is broken tests if any selector/helper paths were missed or mis-referenced. > > **Overview** > Refactors E2E and WDIO test code to **centralize selectors under `tests/selectors`** (and multichain helpers under `tests/helpers`) instead of `e2e/selectors` / `e2e/utils`, updating imports across browser, onboarding, ramps, send, settings, stake, swaps, and WDIO screen objects. > > Moves `MultichainUtilities` into the `tests` helper space and fixes its internal import paths (app `NETWORKS_CHAIN_ID` and test `createLogger`), then updates multichain smoke tests to consume the new helper location and selector paths (including `MULTICHAIN_TEST_TIMEOUTS`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bb2047b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR bumps the Tron snap to the latest version bringing in bug fixes and unblocking dApp connectivity ## **Changelog** CHANGELOG entry: null ## **Related issues** n/a ## **Manual testing steps** All Tron features ## **Screenshots/Recordings** ### **Before** n/a ### **After** n/a ## **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** > Dependency-only version bump with no application code changes; risk is limited to potential behavioral changes inside the updated Tron snap package. > > **Overview** > Bumps the `@metamask/tron-wallet-snap` dependency from `^1.19.2` to `^1.21.1`. > > Updates `yarn.lock` to resolve and lock the new Tron snap version (including its checksum/resolution entries). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c9afeba. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
## **Description**
This change removes an outdated hardcoded title override in
`parsePolymarketEvents` for event id `188978`.
Reason for change:
1. The temporary Super Bowl-specific override is stale technical debt.
2. It can incorrectly rewrite provider data.
Improvement:
1. Event titles now consistently come from `event.title`.
2. The TODO for the temporary workaround is removed.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: N/A
## **Manual testing steps**
```gherkin
Feature: Predict event parsing cleanup
Scenario: parser preserves provider title for legacy event id
Given a Polymarket event payload with id "188978" and a custom title
When `parsePolymarketEvents` parses the payload
Then the parsed market title matches the payload title
```
## **Screenshots/Recordings**
### **Before**
N/A
### **After**
N/A
## **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**
> Single-line change to market title mapping; low complexity and no
security, auth, or data persistence impact.
>
> **Overview**
> Removes a one-off hardcoded title override in `parsePolymarketEvents`
that rewrote event `188978` to "Super Bowl LX".
>
> Polymarket market titles now always come directly from `event.title`,
eliminating stale special-casing and preventing provider data from being
incorrectly rewritten.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
18cc72e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**
The Deposit `AccountSelector` component does not properly truncate long
account names, causing text to overflow horizontally and get cut off at
screen edges. This differs from the Aggregator `AccountSelector` which
correctly truncates with middle ellipsis.
### Root Cause
The Deposit `AccountSelector` was missing `flexShrink: 1` on both the
container and text elements. Without this property:
- `numberOfLines={1}` and `ellipsizeMode="middle"` cannot work because
the text width is unconstrained
- The parent container grows indefinitely, causing overflow instead of
truncation
### Solution
Added `flexShrink: 1` to match the Aggregator `AccountSelector` pattern:
1. Added `flexShrink: 1` to the `selector` style
2. Created new `accountText` style with `flexShrink: 1`
3. Applied `accountText` style to the Text component
## **Changelog**
CHANGELOG entry: Fixed long account names overflowing in the Deposit Buy
screen by enabling proper text truncation
## **Related issues**
Refs: N/A (discovered during UI review)
## **Manual testing steps**
```gherkin
Feature: Deposit AccountSelector long name truncation
Scenario: User sees truncated account name with middle ellipsis
Given the user has an account with a very long name (e.g., "Account 4 - This is a very long account name for testing purposes")
And the user navigates to the Deposit/Buy flow
When user views the BuildQuote screen
Then the account name should be truncated with ellipsis in the middle (e.g., "Account 4 - T...ting purposes")
And the account selector pill should not overflow the screen
And the region selector should remain visible on the right side
```
## **Screenshots/Recordings**
### **Before**
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/59e19f26-f065-49be-a676-61347b88af23"
/>
### **After**
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/49e4884a-ca72-4852-81c0-3c14e3269767"
/>
## **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, isolated styling change to a UI component; primary risk is
minor layout regression across devices/themes.
>
> **Overview**
> Fixes an overflow issue in the Deposit ramp `AccountSelector` where
long account names could push the selector pill beyond screen bounds
instead of truncating.
>
> Adds `flexShrink: 1` to the selector container and applies a new
`accountText` style (also `flexShrink: 1`) to enable `numberOfLines={1}`
+ middle ellipsis to work reliably; updates the `BuildQuote` snapshot
accordingly.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f13c5a1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…tAmount cp-7.65.0 (#25759) <!-- 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** 1. **What is the reason for the change?** When the user changed the payment token or when the effective balance dropped, the Perps order form was resetting the amount to max whenever the current amount was greater than the new max. That logic could also run when the user had intentionally set the amount to 0 or left it empty (e.g. initial value 10), and `setAmount` was forcing empty values to `'0'`, which made it harder to preserve the intended initial amount. 2. **What is the improvement/solution?** - In the `useEffect` that reacts to `balanceForMax` / `maxPossibleAmount` / `orderForm.amount`: only reset the amount when it actually exceeds the new max. If `currentAmount === 0`, `maxPossibleAmount === 0`, or `currentAmount < maxPossibleAmount`, we return early and do not overwrite the form amount. - In `setAmount`, pass through the `amount` string as-is and remove the `|| '0'` fallback so the form can keep an empty or user-chosen initial value (e.g. 10) without being forced to `'0'`. ## **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 form so the amount is only reset when it exceeds the new max after changing payment token or balance, and no longer overwrites an initial or empty amount. ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Perps order form amount when balance or payment token changes Scenario: user has set amount to 10 and then changes payment token Given user is on the Perps order view with amount set to 10 (or another value below the new max) When user changes the payment token (or balance updates so max possible amount changes) Then the amount remains 10 and is not reset to max or to 0 ``` ## **Screenshots/Recordings** ### **Before** No visible change ### **After** No visible change ## **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 UI state synchronization logic; primary risk is subtle regressions in amount clamping behavior when balances update. > > **Overview** > Adjusts the Perps order form auto-clamp logic so `orderForm.amount` is only reset when it *actually exceeds* the newly computed `maxPossibleAmount` after balance/payment-token changes. > > This refactors the `useEffect` to parse the current amount directly, early-return for zero/under-max cases, and then set the amount to `Math.floor(maxPossibleAmount)` only when clamping is required. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9d6f45b. 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** <!-- 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? --> - Bump @metamask/eth-ledger-bridge-keyring to 11.2.0 - Bump @metamask/keyring-api to 21.4.0 ## **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: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1440 ## **Manual testing steps** Not applicable ## **Screenshots/Recordings** Not applicable ## **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] > **Medium Risk** > Dependency-only change, but it touches hardware wallet/keyring packages where regressions could affect Ledger interactions or signing flows. > > **Overview** > Bumps keyring-related dependencies to pick up upstream changes: `@metamask/eth-ledger-bridge-keyring` `11.1.0` → `11.2.0` and `@metamask/keyring-api` `21.3.0` → `21.4.0`. > > Updates `yarn.lock` accordingly, including refreshed transitive dependency versions (notably `@metamask/keyring-utils` `3.1.0` → `3.2.0` and new `keyring-api` dependencies like `uuid`/`async-mutex`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fafda4a. 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**
<!--
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?
-->
Corrected the following issues with the new button layout:
- Remove token option hidden for MUSD and for tokens that are not part
of the state
- Do not show send option if the token has no balance
- Removed some old code from a feature flag that was enabled about a
year ago
## **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 minor button layout issues
## **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**
- [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**
> UI/UX logic and test updates only; no changes to transaction signing,
balances, or protocol interactions beyond adjusting when buttons/options
are shown.
>
> **Overview**
> Fixes Token Details action/menu visibility to match the new layout
rules: the main actions no longer show **Send** when the token has no
balance, and perps vs non-perps states now map to consistent button sets
(covered by expanded `TokenDetailsActions` tests).
>
> Updates the “More” actions menu so **Remove token** only appears when
the token is actually present in the account’s assets and is *not*
`mUSD` (new selector check + tests).
>
> Cleans up legacy buy gating by removing the old deposit
feature-flag/min-version check in `TokenDetails.tsx`, so
`displayBuyButton` is now driven solely by Ramp availability.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
16d77d1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description** Remove `disableUpgrade` optimisation for Predict deposits to ensure non-Relay transactions using Polygon USDCe can still upgrade the EOA. Intentionally not applied per transaction data to reduce complexity and improve stability. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: [#6820](MetaMask/MetaMask-planning#6820) ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **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 transaction submission options for deposits; behavior changes could affect batching/upgrade flow on Polygon and should be validated against real deposit scenarios. > > **Overview** > Predict deposits no longer pass `disableUpgrade: true` to `addTransactionBatch` in `PredictController.depositWithConfirmation`, allowing the underlying transaction flow to perform an account upgrade when required (e.g., non-relay Polygon USDCe deposits). > > Updates the deposit unit test to match the new `addTransactionBatch` call signature (removing the `disableUpgrade` expectation). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 19019f2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
… send flow (#25648) <!-- 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** <!-- 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? --> Adds proper error handling for non-EVM transaction submissions. When a multichain snap (Solana, Tron) returns validation errors during send, the error is displayed on the Continue button so users can correct the issue. - Added submitError state to SendContext with auto-clear on input changes - Display snap validation errors on the Amount screen's Continue button - Navigate back 2 screens to Amount when submission fails - Bumped @metamask/tron-wallet-snap to ^1.20.0 Related Extension PR: MetaMask/metamask-extension#39667 ## **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: Validation errors from non-EVM transaction snaps will now be displayed to users during send flow. ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/NEB/boards/3738?assignee=62710850d7fd480068d7cff9&selectedIssue=NEB-385 ## **Manual testing steps** ```gherkin Feature: Display snap validation errors in send flow Scenario: User sees Insufficient balance to cover fees error on Tron send Given user has a Tron account with a balance > 10 TRX When user attempts to send all his balance to a non activated account(Any account that never received TRX before) Then the snap returns a validation error And user is navigated back to Amount screen And the Continue button displays "Insufficient balance to cover fees error" with danger styling Scenario: User clears error by changing amount Given user sees an error on the Continue button When user changes the amount Then the error is cleared and button shows "Continue" ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> <img width="377" height="794" alt="image" src="https://github.com/user-attachments/assets/fe7ce624-4bd3-462e-b437-095bd270b62a" /> ## **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** > Adds new error-handling paths for non-EVM snap transaction submission, which can change user flow and messaging. Risk is moderate due to reliance on snap return shapes and new branching around navigation/alerts. > > **Overview** > Non-EVM send submission now surfaces snap validation failures and internal errors to users instead of silently ignoring them. > > `useSendActions` inspects the `sendMultichainTransactionForReview` result for `valid: false`, maps snap error codes to localized messages, and shows an `Alert` (falling back to a new generic `send.transaction_error` string when no error details are provided). It also distinguishes user rejection via `errorCodes.provider.userRejectedRequest` to avoid showing an error UI. > > Adds unit tests covering non-EVM snap validation errors (with/without an `errors` array), specific code translations, user rejection behavior, generic failures, and successful navigation; and exports `mapSnapErrorCodeIntoTranslation` for reuse. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 719916c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…interactions (#25761) <!-- 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** <!-- 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? --> Add analytics tracking for two Segment events in the mUSD claim bonus flow: 1. **mUSD Claim Bonus Button Clicked** (updated) — now also fires from the `ClaimOnLineaBottomSheet` when the user taps "Continue" (`action_type: claim_bonus`) or dismisses via the close button (`action_type: dismiss`). The existing event from the asset overview "Claim" CTA is unchanged. Network/asset context is forwarded from the parent component via route params. 2. **Tooltip Opened** (new trigger) — fires when the user taps the info (i) icon next to "Claimable bonus" in `PendingMerklRewards`, with `tooltip_name: "Claim Bonus Info"`, `location: "asset_overview"`, and `experience: "MUSD_BONUS"`. Both events use the non-deprecated `useAnalytics` hook and `EVENT_NAME` constants. ## **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: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: mUSD Claim Bonus Button Clicked from bottom sheet Scenario: User taps Continue in claim bottom sheet Given the user is on the mUSD asset overview with a claimable bonus displayed When the user taps the "Claim" button Then "mUSD Claim Bonus Button Clicked" fires with location "asset_overview" and action_type "claim_bonus" And the ClaimOnLinea bottom sheet opens When the user taps "Continue" in the bottom sheet Then "mUSD Claim Bonus Button Clicked" fires with location "claim_bonus_bottom_sheet" and action_type "claim_bonus" Scenario: User dismisses the claim bottom sheet Given the ClaimOnLinea bottom sheet is open When the user taps the close (X) button Then "mUSD Claim Bonus Button Clicked" fires with location "claim_bonus_bottom_sheet" and action_type "dismiss" And the bottom sheet closes Feature: Tooltip Opened for claimable bonus info Scenario: User opens the claimable bonus tooltip Given the user is on the mUSD asset overview with a claimable bonus displayed When the user taps the info (i) icon next to "Claimable bonus" Then "Tooltip Opened" fires with tooltip_name "Claim Bonus Info", location "asset_overview", and experience "MUSD_BONUS" And the tooltip modal opens with bonus description text ``` ## **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 adds analytics event tracking and constants, with minimal impact on user flow beyond extra side-effect calls; risk is limited to incorrect/missing analytics properties. > > **Overview** > Adds additional analytics instrumentation to the mUSD Merkl rewards flow. > > The claim-on-Linea bottom sheet now fires `EVENT_NAME.MUSD_CLAIM_BONUS_BUTTON_CLICKED` for both **Continue** (`action_type: claim_bonus`) and **Close** (`action_type: dismiss`), and `ClaimMerklRewards` forwards optional network/asset context via new `analyticsContext` route params (with a new `CLAIM_BONUS_BOTTOM_SHEET` location constant). `PendingMerklRewards` now tracks `EVENT_NAME.TOOLTIP_OPENED` when the “Claimable bonus” info icon is tapped, including tooltip metadata and experience, with tests updated to assert these events. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit dbce143. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description**
Integrates automatic quote polling from `ramps-controller` v7.0.0 into
the BuildQuote screen for the unified ramps V2 experience.
### What changed:
- **New `selectQuotes` selector**: Follows the ResourceState pattern
(`data`, `selected`, `isLoading`, `error`)
- **New `useRampsQuotes` hook**: Exposes `startQuotePolling()`,
`stopQuotePolling()`, and quotes state
- **Updated `useRampsController`**: Includes quotes-related state and
methods
- **BuildQuote integration**:
- Starts polling with `defaultAmount` on mount for pre-fetching
- 500ms debounced polling when user changes amount
## **Changelog**
CHANGELOG entry: null
## **Related issues**
## **Manual testing steps**
```gherkin
Feature: Quote polling in BuildQuote screen
Scenario: User enters amount and sees quote loading state
Given user is on the BuildQuote screen with a token selected
When user enters an amount via keypad
Then continue button shows loading state immediately
And quote is fetched after 500ms debounce
And continue button becomes enabled when quote is received
Scenario: Quote auto-refreshes every 15 seconds
Given user has entered an amount and quote is displayed
When 15 seconds pass
Then a new quote is fetched automatically
And if only one quote is returned, it is auto-selected
Scenario: Polling stops on screen unmount
Given user is on BuildQuote screen with active polling
When user navigates away
Then quote polling stops to prevent memory leaks
```
## **Screenshots/Recordings**
### **Before**
N/A - New feature
### **After**
<!-- Add recording showing quote polling behavior -->
https://github.com/user-attachments/assets/7d4de43f-dbe3-4006-a3af-52d6e8b6f35c
## **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 purchase-quote fetching/polling and UI gating logic, which
could impact conversion flow if polling start/stop conditions or
amount/quote matching are off. Changes are localized and covered by
new/updated unit tests, but still depend on correct controller/messenger
behavior.
>
> **Overview**
> **Adds quotes support to the unified ramps V2 flow.** Introduces
`selectQuotes` plus a new `useRampsQuotes` hook (state +
`startQuotePolling`/`stopQuotePolling`) and wires it into
`useRampsController`, including messenger support for
`RampsService:getQuotes`.
>
> **BuildQuote now auto-polls quotes and gates continuation on a fresh
quote.** The amount input defaults to `$100` (or a region
`defaultAmount`), polls quotes with a 500ms debounce when amount/payment
method/address are present, stops polling otherwise/on unmount, and
disables + shows loading on the Continue button until `selectedQuote` is
available and matches the current amount; tests/snapshots are updated
accordingly. Provider selection UI is also updated to render a
selectable providers list with updated snapshots.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9839518. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: George Weiler <george.weiler@consensys.net>
<!--
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 purpose of this PR is to update the component test guidelines to
make them more practical. The goal is to help developers decide what to
test and provide clearer examples of how to write those tests.
### Component Testing Documentation
- The component view tests lived in `app/util/test/component-view/` and
were moved to: `docs/readme/component-testing.md`
- Added "What are Component View Tests?" section at the top to explain
the concept before diving into details
- Added a decision table showing when to use unit tests, component
tests, or E2E tests
- Added clear guidance on choosing between component tests and E2E tests
with examples
- Reorganized the document so it flows logically:
- Merged small scattered sections into related sections (combined
Determinism with Writing Tests, combined Do/Don't with
Enforcement)
- Moved Platform Matrix section to a better spot in the flow
**Documentation links:**
- Added component testing to the main README documentation list
- Fixed broken links in cursor rules files that pointed to a README that
didn't exist
- All documentation now points to the correct location
## **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**
> Documentation-only changes plus link/reference updates; no runtime
code or test logic is modified.
>
> **Overview**
> Updates component-view testing docs by **moving the framework guide
from `app/util/test/component-view/README.md` to
`docs/readme/component-view-testing.md`** and expanding it with clearer
“when to use” guidance (incl. unit vs component vs E2E decision table
and examples).
>
> Fixes and standardizes references to the new doc location across
Cursor rule files and the root `README.md`, and tweaks the
component-view testing rules doc to align terminology (“component view”)
and improve the `renderScreenWithRoutes` navigation example.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
93644f2. 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**
Improves stability of the mUSD Conversion Happy Path smoke E2E by moving
app launch responsibility fully into withFixtures (removing the explicit
launchApp in beforeAll) so mocks/fixtures are in place before any
network activity.
Updates the shared fixture config to set skipReactNativeReload: true to
avoid a native crash during cleanup when test synchronization is
disabled, and deflakes assertions by navigating back to Wallet after
verifying the conversion in Activity plus removing an extra token-list
scroll step in the returning-user flow.
<!--
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**
```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 changes that adjust E2E setup/cleanup and navigation to
reduce flakiness; no production logic or security-sensitive code is
affected.
>
> **Overview**
> Improves stability of the `mUSD Conversion Happy Path` smoke E2E by
**moving app launch responsibility fully into `withFixtures`** (removing
the explicit `launchApp` in `beforeAll`) so mocks/fixtures are in place
before any network activity.
>
> Updates the shared fixture config to set `skipReactNativeReload: true`
to avoid a native crash during cleanup when test synchronization is
disabled, and deflakes assertions by navigating back to Wallet after
verifying the conversion in Activity plus removing an extra token-list
scroll step in the returning-user flow.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
350b924. 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 : )