Skip to content

[pull] main from MetaMask:main#499

Merged
pull[bot] merged 9 commits into
Reality2byte:mainfrom
MetaMask:main
Feb 4, 2026
Merged

[pull] main from MetaMask:main#499
pull[bot] merged 9 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull

@pull pull Bot commented Feb 4, 2026

Copy link
Copy Markdown

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 : )

gambinish and others added 9 commits February 4, 2026 17:47
## **Description**

This PR addresses multiple market discovery UX issues for Perps:
1. Fix "See all perps" navigation: The button in the main perps tab now
correctly navigates to the Market List search with "all" selected,
instead of redirecting to perps home
2. Include all market categories in explore section: The explore section
in wallet home and perps tab empty state no longer filters out
commodities and forex markets
3. Add Commodities section to Perps Home: A new Commodities section is
now displayed between Crypto and Stocks on the perps home screen
4. Temporarily disable market type badges: Stock/commodity badges on
list items are commented out (can be quickly re-enabled if needed)


## **Changelog**

CHANGELOG entry: Improvements to market discoverability

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2467

## **Manual testing steps**

```gherkin
Feature: Perps market discovery improvements

  Scenario: See all perps navigates to market list with all filter
    Given I am on the wallet home Perps tab with no positions
    When I tap "See all perps"
    Then I am on the Market List with "All" filter selected

  Scenario: Explore section includes all market categories
    Given I am on the wallet home Perps tab with no positions
    Then the explore section shows crypto, stocks, commodities, and forex markets

  Scenario: Commodities section appears between Crypto and Stocks
    Given I am on the Perps Home screen
    Then sections appear in order: Crypto, Commodities, Stocks, Forex

  Scenario: Market type badges are hidden
    Given I am viewing any market list
    Then no STOCK or COMMODITY badges appear on market rows
```

## **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]
> **Medium Risk**
> Medium risk: changes navigation targets and broadens market inclusion
logic, which can alter user flows and market ordering across key Perps
entry points, but does not touch trading/auth or core data handling.
> 
> **Overview**
> **Perps market discovery UX is broadened and re-routed.** The Perps
tab “See all perps” CTA now navigates directly to
`Routes.PERPS.MARKET_LIST` with `defaultMarketTypeFilter: 'all'`
(instead of `PERPS_HOME`).
> 
> **Explore and home market coverage is expanded.**
`usePerpsTabExploreData` no longer filters to crypto/equity only, so the
explore list includes all market types (tests updated accordingly), and
`PerpsHomeView` adds a new Commodities section between Crypto and
Stocks.
> 
> **Badges are temporarily suppressed.** `PerpsMarketRowItem` defaults
`showBadge` to `false`, effectively hiding stock/commodity badges unless
explicitly enabled.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0516bfa. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…5644)

<!--
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**

bring back destination asset sync to new asset picker. Original PR
#23822

<!--
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: bring back destination asset sync to new swaps asset
picker

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3935

## **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]
> **Medium Risk**
> Updates bridge token-selection behavior to automatically adjust the
destination token when the source token changes, which can affect
swap/bridge state and user expectations but stays within UI selection
logic.
> 
> **Overview**
> Restores destination-asset syncing in the Bridge asset picker by
invoking `useAutoUpdateDestToken` whenever a new **source** token is
selected (normal selection path), while leaving the
swap-on-select-other-token behavior unchanged.
> 
> Updates `useTokenSelection` unit tests to mock
`useAutoUpdateDestToken` and assert the auto-update call occurs for
source changes and does *not* occur when tokens are swapped.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b9f942d. 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 reverts the unintentional header change for the confirmation
screens
<!--
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: Fixed incorrect title for confirmation screens 

## **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**


https://github.com/user-attachments/assets/91af13b2-5e99-41c9-a978-26c67986a6b3

<!-- [screenshots/recordings] -->

### **After**


https://github.com/user-attachments/assets/aa47fbf6-b861-426b-a74b-e85c494c9723

<!-- [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**
> Low risk UI/navigation change that only affects confirmation screen
header visibility; main risk is unintended header state for certain
confirmation types due to `setOptions` dependency changes.
> 
> **Overview**
> Restores confirmation header behavior by **using React Navigation’s
header only for full-screen confirmations** (`isFullScreenConfirmation`)
and keeping it hidden for modal/bottom-sheet confirmations.
> 
> Removes the in-view `HeaderCenter` from the full-screen confirmation
layout, and updates tests to mock `useFullScreenConfirmation` and assert
the new `navigation.setOptions({ headerShown, gestureEnabled })`
behavior.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
406f602. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

This PR fixes the stop loss prompt banner to calculate the suggested
trigger price correctly per the original specs. The banner was
previously using a fixed -50% ROE calculation, but the design spec
called for the midpoint between current price and liquidation price.

**Stop Loss Price Calculation**
- Changed from calculating a price at -50% ROE to using the midpoint
between current (mark) price and liquidation price
- The displayed ROE percentage now reflects the actual loss at that
midpoint, rather than a hardcoded -50%

**Position Age Requirement**
- Increased from 1 minute to 2 minutes before showing the banner
- Prevents the banner from appearing too soon after opening a position

**Mark Price for Calculations**
- Now uses the oracle mark price instead of the order book mid price
- Reduces manipulation risk since mark price is sourced from external
oracles rather than the exchange's order book

**Safety Guard for Proximity**
- If the suggested stop loss price is within 3% of the current mark
price, the banner now shows "Add margin" instead of "Set stop loss"
- Prevents accidental immediate fills if the stop loss would trigger
right away

The original implementation had a mismatch between the documentation in
the spec (which said "midpoint") and the actual code (which used -50%
ROE). The midpoint approach is better because it adapts to how close the
position is to liquidation, rather than using a fixed percentage that
might be inappropriate for the situation.

## **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: Fixes incorrect stop lost banner price

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2323

## **Manual testing steps**

```gherkin
Feature: Stop Loss Prompt Banner

  Background:
    Given user has an open Perps position with isolated margin
    And position has no existing stop loss set
    And position has no take profit that would close before liquidation

  # Midpoint Price Calculation
  Scenario: Banner suggests stop loss at midpoint between current and liquidation price
    Given current mark price is $50,000
    And liquidation price is $40,000
    And position ROE is at or below -10%
    And position has been open for more than 2 minutes
    When the stop loss prompt banner appears
    Then suggested stop loss price should be $45,000
    And suggested stop loss price should be the midpoint between current and liquidation

  # Position Age Requirement
  Scenario: Banner does not appear until position is 2 minutes old
    Given position ROE is -15%
    And position was opened less than 2 minutes ago
    When user views the position details
    Then stop loss prompt banner should NOT be displayed

  Scenario: Banner appears after position is 2 minutes old
    Given position ROE is -15%
    And position has been open for more than 2 minutes
    And ROE has been below -10% for at least 60 seconds
    When user views the position details
    Then stop loss prompt banner should be displayed
    And banner variant should be "stop_loss"

  # Safety Guard - Suggested SL Too Close to Current Price
  Scenario: Shows add margin variant when suggested SL is within 3% of current price
    Given current mark price is $50,000
    And liquidation price is $49,000
    And midpoint would be $49,500 (1% from current price)
    And position ROE is at or below -10%
    And position has been open for more than 2 minutes
    When the stop loss conditions are met
    Then banner variant should be "add_margin"
    And banner should NOT suggest setting a stop loss

  Scenario: Shows stop loss variant when suggested SL is more than 3% from current price
    Given current mark price is $50,000
    And liquidation price is $40,000
    And midpoint would be $45,000 (10% from current price)
    And position ROE is at or below -10%
    And position has been open for more than 2 minutes
    When the stop loss conditions are met
    Then banner variant should be "stop_loss"
    And banner should suggest setting stop loss at $45,000

  # Near Liquidation - Add Margin Variant
  Scenario: Shows add margin variant when within 3% of liquidation
    Given current mark price is within 3% of liquidation price
    And position ROE is at or below -10%
    And position has been open for more than 2 minutes
    When user views the position details
    Then banner variant should be "add_margin"
    And banner should suggest adding margin

  # Suppression Conditions
  Scenario: Banner is suppressed for cross margin positions
    Given position uses cross margin
    And position ROE is -15%
    When user views the position details
    Then stop loss prompt banner should NOT be displayed

  Scenario: Banner is suppressed when stop loss already exists
    Given position has an existing stop loss set
    And position ROE is -15%
    When user views the position details
    Then stop loss prompt banner should NOT be displayed

  # One-Tap Flow
  Scenario: User sets stop loss via one-tap banner action
    Given stop loss prompt banner is displayed with variant "stop_loss"
    And suggested stop loss price is $45,000
    When user taps "Set stop at $45,000"
    Then spinner should appear on the button
    And stop loss order should be placed at $45,000
    And success toast should appear
    And banner should fade out
```

## **Screenshots/Recordings**

**BEFORE**

<img width="351" height="251" alt="Screenshot 2026-02-03 at 12 11 52 PM"
src="https://github.com/user-attachments/assets/7d9fc758-c80a-4b84-a081-85e30793a483"
/>
<img width="357" height="643" alt="Screenshot 2026-02-03 at 12 12 53 PM"
src="https://github.com/user-attachments/assets/c4dcc342-a55c-4659-9532-d4f28ae6337a"
/>
<img width="358" height="591" alt="Screenshot 2026-02-03 at 12 12 40 PM"
src="https://github.com/user-attachments/assets/e23e2516-361e-4dae-9e7a-fcfe4258a349"
/>

**AFTER**

<img width="362" height="617" alt="Screenshot 2026-02-03 at 12 00 38 PM"
src="https://github.com/user-attachments/assets/b4105d6c-9297-4226-a05e-0d3a1bf2e2de"
/>
<img width="363" height="618" alt="Screenshot 2026-02-03 at 11 59 50 AM"
src="https://github.com/user-attachments/assets/3cd04de6-b218-4cfa-8a3d-1bddb74fe0d1"
/>
<img width="349" height="95" alt="Screenshot 2026-02-03 at 11 59 26 AM"
src="https://github.com/user-attachments/assets/3d9bdd1c-958a-4104-aa58-09c992e81f0f"
/>
<img width="360" height="768" alt="Screenshot 2026-02-03 at 11 59 04 AM"
src="https://github.com/user-attachments/assets/60c76ccb-53ce-421b-9525-96cb272504a9"
/>

## **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 user-facing risk-management logic (price source, suggested
stop-loss computation, and banner variant selection), which could affect
when users are prompted to set orders or add margin if the calculations
are wrong.
> 
> **Overview**
> **Stop-loss prompt banner logic is updated to match the intended
spec.** The suggested stop-loss trigger price now uses the midpoint
between *current mark price* and liquidation price, and the displayed
ROE percent is computed from that midpoint (instead of a fixed
configured ROE).
> 
> **Banner timing and safety guards are tightened.** The minimum
position age before showing any banner is increased to 2 minutes, the
market details view prefers `markPrice` (oracle) for calculations with
fallback to mid price, and the hook now falls back to `add_margin` when
the suggested stop-loss is missing or within 3% of current price; tests
were expanded/updated accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0877c37. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

This PR addresses multiple issues with historical Perps order display,
focusing on accurate fill percentage calculation and proper price
formatting for low-priced assets.

**Problem 1: Inaccurate fill percentages for historical orders**
HyperLiquid's historical orders API returns sz=0 for all completed
(filled/canceled) orders, making it impossible to calculate accurate
partial fill percentages. This caused canceled orders that were
partially filled to incorrectly display 0% or 100% filled.

**Solution 1: Reverse mapping from fills**
Build a fillSizeByOrderId Map in usePerpsTransactionHistory that
aggregates total filled size from actual fill data
Pass this map to transformOrdersToTransactions to calculate accurate
filled percentages
For orders with fill data, compute percentage as (actualFilledSize /
originalSize) * 100
Fallback to status-based logic when fill data unavailable

**Problem 2: Loss of precision for low-priced assets**
Assets like meme coins with prices below $0.01 were displaying "< $0.01"
for limit prices in order transaction details, losing important
precision for users.

**Solution 2: Universal price formatting**
Changed PerpsOrderTransactionView to use formatPerpsFiat with
PRICE_RANGES_UNIVERSAL instead of formatPositiveFiat
Now displays exact prices like "$0.00234" instead of "< $0.01"

## **Changelog**

CHANGELOG entry: Fixed inaccurate fill percentages for historical Perps
orders and improved price precision for low-priced assets

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2056

## **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]
> **Medium Risk**
> Touches perps transaction history aggregation and order/fee/price
formatting, which can impact user-visible financial values and
percentages. Logic is covered by expanded unit tests but may still have
edge-case risk across order statuses and fill data quality.
> 
> **Overview**
> **Improves Perps order history accuracy and precision.** Historical
orders now compute *filled %* using aggregated fill sizes (passed
through `usePerpsTransactionHistory` into
`transformOrdersToTransactions`) to avoid HyperLiquid’s `sz=0`
limitation on completed orders, with clear fallbacks for
filled/canceled/rejected/open and position-bound TP/SL edge cases.
> 
> **Shows exact sub-cent values in order details.**
`PerpsOrderTransactionView` switches limit price and fee formatting to
`formatPerpsFiat` with `PRICE_RANGES_UNIVERSAL`, displaying precise
values (e.g., `$0.00234`, `$0.005`) rather than `"< $0.01"`, and
updates/expands tests accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fd57953. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
#25657)

<!--
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 commit removes the `report_results_stage` from the Bitrise
configuration and deletes the associated `testrail.api.js` script, as
they are no longer utilized in the CI/CD pipeline. This cleanup helps
streamline the build process and reduces unnecessary code.

## **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-1358

## **Manual testing steps**

```gherkin
Feature: Remove TestRails Integration

  Scenario: Release pipeline operates without TestRails
    Given the TestRails integration code has been removed
    When the release_e2e_pipeline runs
    Then it should execute build, test, and notify stages
    And it should not attempt to report results to TestRails
    And it should complete without errors
```

## **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
- [ ] 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).
- [x] 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**
> Low risk cleanup limited to CI configuration; it only removes an
unused TestRail-reporting stage/workflow and its Node script, with no
impact to app runtime code.
> 
> **Overview**
> Removes the unused TestRail results reporting from Bitrise by deleting
`report_results_stage` (and its
`run_testrail_update_automated_test_results` workflow) and dropping it
from `release_e2e_pipeline`.
> 
> Deletes the associated `scripts/testrail/testrail.api.js` script that
called the TestRail API to create a run and mark automated tests as
passed.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
448975f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
… conversion payment token (#25604)

<!--
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 fixes an issue where the "Pay with" menu would become
unresponsive after selecting a token during the mUSD conversion flow.

Cause of bug:
1. Clicking an mUSD CTA multiple times in quick succession was creating
more than one approval request.
2. When the user changes their payment token to one on another network,
the mUSD same-chain enforcement kicks in to reject the previous and
create a new transaction targeting the same chain as the new payment
token.
3. The `pay-with-row` depends on the first approval request in the
pending approvals array. When we'd reject the original tx, the duplicate
(without payment token set) would be the next to be used.

Step breakdown:
1. Default state (before doing anything)
  - pending approvals = [ ] // empty

3. Spam click the conversion CTA (e.g. Mainnet DAI) and created multiple
transactions (e.g. 2) instead of the expected 1.
  - pending approvals = [ tx-1-mainnet-dai, tx-2-no-payment-token-set ]

4. Switch your payment token to one on another network (e.g. Linea
USDC). Here we reject your old tx (tx-1-mainnet-dai) and create a new
one (tx-3-linea-usdc).
  - pending approvals = [ tx-2-no-payment-token-set, tx-3-linea-usdc ]

5. The "Pay with" row is stuck in an infinite loading state because it
always reads the first pending approval which in this case doesn't have
a payment token set. I think this is why the rest of the screen is
interactive except the "Pay with" row.

Proposed Fixes
- Post‑approval guard (existingPendingMusdConversion): Once the first
musdConversion transaction is created, it shows up as a pending approval
in Redux. Any subsequent CTA presses should reuse that existing pending
conversion (and navigate back into its confirmation screen) instead of
creating a second transaction.
 
- Pre‑approval guard (inFlightInitiationPromises): There’s a short “race
window” right after the user taps the CTA where we’ve started async
initiation, but the approval hasn’t appeared in Redux yet. If the user
spams the CTA in that window, the post‑approval guard can’t see anything
to reuse yet—so we use a single-flight promise keyed by account+chain to
ensure all concurrent calls await the same in-flight initiation and only
one transaction gets created.

<!--
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?
7. 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`
7. 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: prevent mUSD conversion initiation from creating
duplicate transactions

## **Related issues**

Fixes: [MUSD-275: During the convert flow, if a different stable coin is
selected from the dropdown, the screen does not load. Unable to
reproduce on android, only iOS once. After closing and re-opening the
app, the issue is
fixed.](https://consensyssoftware.atlassian.net/browse/MUSD-275)

## **Manual testing steps**

```gherkin
Feature: Reliable mUSD conversion initiation

  Scenario: user re-enters an existing pending mUSD conversion
    Given user has a pending mUSD conversion approval for the selected account on the selected network

    When user taps the "Get 3% mUSD bonus" conversion CTA again
    Then user is navigated to the mUSD conversion confirmation
    And no additional conversion transaction is created

  Scenario: user taps the conversion CTA multiple times before the approval appears
    Given user is viewing a token that supports mUSD conversion on the selected network

    When user taps the "Get mUSD bonus" conversion CTA multiple times in rapid succession
    Then only one mUSD conversion transaction is created
    And the user is navigated to the mUSD conversion confirmation once
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

https://github.com/user-attachments/assets/c6af4fab-bc4e-4c0a-8f55-7a767df01368

### **After**
Spam clicking the mUSD conversion CTA doesn't break the "Pay with" menu
<!-- [screenshots/recordings] -->

https://github.com/user-attachments/assets/324cefa1-162d-4248-a1b8-2e9b907b4a4e

## **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 mUSD conversion initiation control flow to reuse existing
pending approvals and single-flight concurrent taps, which could affect
transaction creation/navigation behavior if edge cases are missed.
> 
> **Overview**
> Prevents duplicate `musdConversion` transactions by (1) detecting an
existing pending conversion for the same account+chain from
`selectPendingApprovals`/`selectTransactionsByIds` and re-entering that
flow, and (2) adding an in-memory single-flight map keyed by
`address+chainId` to coalesce rapid taps before Redux reflects the
pending approval.
> 
> Updates `useMusdConversion` tests to cover concurrent initiation reuse
and returning an existing pending conversion ID (including mixed-case
address/chain handling), and wraps async hook calls in `act` to align
with React state updates.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b4c0529. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Updated the perps onboarding carousel animations to remove empty space,
improving the alignment and visual presentation in the carousel display.
The animations now fit better within the carousel frame without
unnecessary padding.

## **Changelog**

CHANGELOG entry: Fixed perps tutorial animation alignment by removing
empty space in carousel

## **Related issues**

Fixes: N/A

## **Manual testing steps**

```gherkin
Feature: Perps Onboarding Tutorial

  Scenario: user views perps onboarding carousel animations
    Given user opens the perps onboarding tutorial
    
    When user scrolls through the carousel
    Then animations should be properly aligned without empty space
    And dark mode animation should align correctly
    And light mode animation should align correctly
```

## **Screenshots/Recordings**

### **Before**

Animations had empty space causing misalignment in the carousel


https://github.com/user-attachments/assets/95d0d833-3adb-41ff-b077-e4570064dce4

### **After**

Animations are properly aligned within the carousel frame


https://github.com/user-attachments/assets/d5019d87-789f-44d5-b024-9e9d8d45bf8d

## **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
- [ ] 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**
> The provided diff is empty (only shows `+++ /dev/null`), so there are
no code or asset changes to review and minimal risk.
> 
> **Overview**
> No effective changes are shown in the provided diff (it only contains
`+++ /dev/null`), so this PR appears to be a no-op from the perspective
of the available patch.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
77dbb39. 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**

Modifies the swap smoke E2E tests to include swap execution with custom
slippage settings.

Changes
- Add SlippageModal page object and selectors to interact with slippage
configuration
- Add mock responses for swaps with custom slippage values
- Update swap helpers to support setting custom slippage before
submitting a swap



https://github.com/user-attachments/assets/bc3baf0b-91ad-441c-9991-89c47ebcf889



## **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**

- [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**

- [X] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [X] 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; main risk is increased E2E brittleness due to new
UI interactions/selectors and slippage-specific mock URL matching.
> 
> **Overview**
> Extends swap E2E coverage to **configure and validate custom
slippage** during swap submission.
> 
> Adds a new `SlippageModal` page object + `SlippageModal.selectors` and
enhances `QuoteView` with `verifySlippageDisplayed()` to assert the
selected slippage percentage.
> 
> Updates the swap helper `submitSwapUnifiedUI()` to accept an optional
`slippage` override (defaulting to `2%`) and adjusts swap
mocks/constants to return a dedicated quote when `slippage=3.5`, with
the smoke test now executing an ETH→USDC swap using `3.5%` slippage.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
037b29b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Feb 4, 2026
@pull pull Bot added the ⤵️ pull label Feb 4, 2026
@pull pull Bot merged commit 7be712d into Reality2byte:main Feb 4, 2026
3 of 37 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants