Skip to content

[pull] main from MetaMask:main#138

Merged
pull[bot] merged 11 commits into
Reality2byte:mainfrom
MetaMask:main
Sep 9, 2025
Merged

[pull] main from MetaMask:main#138
pull[bot] merged 11 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Sep 9, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

bfullam and others added 11 commits September 9, 2025 17:45
…19398)

<!--
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 syncs the swaps UI with the network filter on the home page. If
a user has a specific network selected in the filter, the swaps UI will
populate with default tokens from that network. If the user has "popular
networks" selected, we fallback to ETH <> USDC on Mainnet as the default
pair.

<!--
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 a bug where the initial swap pairs were out of
sync with the home page network filter

## **Related issues**

Fixes: #19130

## **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.
<!--
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 a critical issue where market orders were being executed
as limit orders and displaying incorrectly in transaction history.

**Root Cause:**
Market orders were using the wrong Time-In-Force (TIF) parameter when
submitted to HyperLiquid. They were using `'Ioc'` (Immediate or Cancel)
which creates limit orders that get canceled if not filled immediately,
rather than true market orders.

**Solution:**
Changed the TIF parameter for market orders from `'Ioc'` to
`'FrontendMarket'`, which is the correct TIF for market orders in
HyperLiquid's system. This ensures:
1. Market orders execute as true market orders at the best available
price
2. HyperLiquid returns the correct order type, fixing transaction
history display
3. No more orders stuck in "queued" state for market orders

**HyperLiquid TIF Parameters Reference:**
- `'Gtc'` (Good Till Canceled): Standard limit orders that remain active
until filled or canceled
- `'Ioc'` (Immediate or Cancel): Limit orders that fill immediately or
cancel unfilled portion - **NOT for market orders**
- `'FrontendMarket'`: True market orders as used in HyperLiquid UI -
**USE THIS FOR MARKET ORDERS**
- `'Alo'` (Add Liquidity Only): Maker-only orders that add liquidity to
order book
- `'LiquidationMarket'`: Similar to IoC, used for liquidation orders

## **Changelog**

CHANGELOG entry: Fixed market orders executing as limit orders and
displaying incorrectly in transaction history

## **Related issues**

Fixes:
[TAT-1475](https://consensyssoftware.atlassian.net/browse/TAT-1475)

## **Manual testing steps**

```gherkin
Feature: Market Order Execution and Display

  Scenario: user places a market order
    Given user is on the Perps order view
    And user has sufficient balance
    And market order type is selected

    When user enters an amount and places a market order
    Then order should execute immediately at market price
    And transaction history should show it as a "market" order
    And order should not get stuck in "queued" state

  Scenario: user places a limit order (regression test)
    Given user is on the Perps order view  
    And user has sufficient balance
    And limit order type is selected

    When user enters an amount, sets a limit price, and places the order
    Then order should be placed as a limit order
    And transaction history should show it as a "limit" order
    And order should remain "open" until filled or canceled

  Scenario: user places an order with TP/SL (regression test)
    Given user is on the Perps order view
    And user has sufficient balance
    And user sets take profit and stop loss prices

    When user places a market order with TP/SL
    Then main order should execute as market order
    And TP/SL orders should be created as trigger orders
    And transaction history should show correct order types

  Scenario: user edits an existing order (regression test)
    Given user has an open limit order
    
    When user modifies the order (price or size)
    Then order modification should use correct TIF based on order type
    And modified order should maintain correct order type display
```

## **Screenshots/Recordings**

### **Before**
- Market orders appeared as "limit" orders in transaction history
- Orders could get stuck in "queued" state
- Confusing order labels in Activity tab

### **After**  
- Market orders display as "market" orders in transaction history
- Orders execute immediately with correct pricing
- Clear and accurate order type labels

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

**Why This Fix Works:**
The TIF parameter determines how HyperLiquid processes and categorizes
orders. Using the wrong TIF caused a cascade of issues:
1. HyperLiquid treated market orders as limit orders internally
2. Order responses contained incorrect order type information
3. Transaction transforms inherited the wrong order type
4. UI displayed confusing labels based on incorrect data

By using the correct TIF at the source (HyperLiquid SDK level), all
downstream issues are resolved automatically.

[TAT-1475]:
https://consensyssoftware.atlassian.net/browse/TAT-1475?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: dylanbutler1 <99672693+dylanbutler1@users.noreply.github.com>
Co-authored-by: Matthew Grainger <46547583+Matt561@users.noreply.github.com>
…9426)

<!--
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 updated the Wallet header to left aligned the AccountPicker for
when RemoveGNS is not available, providing more space for the
AccountPicker to render the account name

<!--
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: #19409

## **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**
<img width="1290" height="2796" alt="Simulator Screenshot - iPhone 15
Pro Max - 2025-09-08 at 10 09 51"
src="https://github.com/user-attachments/assets/f9589c71-8e28-45f2-b67e-d0fe6b6cbcd2"
/>

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

### **After**

https://github.com/user-attachments/assets/3d96d9af-40a5-4b86-9b5a-9bed254cc013

<!-- [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.
<!--
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 introduces a new `MultichainAccountConnect` component and wires
it upto state two.

<!--
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: adds support for account groups in dapp connection
flow.

## **Related issues**

Fixes:
https://consensyssoftware.atlassian.net/browse/MUL-669?atlOrigin=eyJpIjoiNDk4MmQ0YTFiMDg0NDFkMzkzMjE0NTQxOTJlYTk2NjAiLCJwIjoiaiJ9

## **Manual testing steps**

```gherkin
Feature: Bip44 dapp connection

  Scenario: user connects to a dapp (https://metamask.github.io/test-dapp-multichain/latest/)
    Given multichain accounts design state 2 is enabled
    When user navigates to a dapp
    And user selects a scope
    And user connects
    Then the dapp connection is successful 
    And wallet is granted all evm permissions for scope
    And wallet is granted all non chain permissions for scope 

```

## **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/035aba90-78e8-4cf2-9c23-29f55da5f1c2




### **After**

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


https://github.com/user-attachments/assets/3b028e1e-0888-4972-94a5-f27dccd19f86



## **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.
can you coplete this:
<!--
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**

should not allow delete selected network

<!--
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: #19453 

## **Manual testing steps**

```gherkin
Feature: should not be able to delete selected network

  Scenario: user attempts to delete the currently selected network
    Given the user has a network selected as the active network
    When the user tries to delete that selected network
    Then the app should prevent the deletion
    And the user should see a message indicating that the active network cannot be removed
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**



https://github.com/user-attachments/assets/46b35532-8a07-489f-8ba2-ec4c4d3b6011



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

Make Android E2E tests optional for now

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

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

- [x] 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.
…test helper (#19464)

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

- Introduced `remoteFeatureMultichainAccountsAccountDetailsV2` mock to
support multichain accounts feature.
- Updated test helpers to include
`withMultichainAccountDetailsV2Enabled` for easier testing of the new
feature flag.
- Recording provided in Jira task using state 2 mock.


<!--
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/MUL-800

## **Manual testing steps**

```gherkin
Scenario: V2 feature flag mock is properly configured
  Given the test environment is set up
  When the remoteFeatureMultichainAccountsAccountDetailsV2 mock is applied
  Then the feature flag should return featureVersion: '2'
  And the enableMultichainAccounts flag should be enabled
  And the minimumVersion should be set to '7.46.0'

Scenario: V2 test helper provides correct setup
  Given a test requires V2 multichain accounts functionality
  When withMultichainAccountDetailsV2Enabled helper is used
  Then the fixture should be properly initialized with multiple account types
  And the device should be restarted for clean state
  And the user should be automatically logged in
  And the account list should be opened and ready for testing
```

## **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.
#19438)

## **Description**

This PR addresses critical performance issues in the Perps tab
identified in the Margelo performance analysis. The main bottleneck was
excessive creation of uncached `Intl.NumberFormat` and
`Intl.DateTimeFormat` instances during market data transformation and
component rendering.

**Root Cause:** Functions in `marketDataTransform.ts` and
`formatUtils.ts` were creating new Intl instances on every call instead
of using the existing cached formatters from `app/util/intl.ts`.

**Solution:** Replace all uncached Intl instantiations with cached
formatters and optimize volume parsing logic with memoization.

## **Changelog**

CHANGELOG entry: Improved Perps tab performance by optimizing currency
and number formatting

## **Related issues**

Fixes: 

## **Manual testing steps**

```gherkin
Feature: Perps tab performance optimization

  Scenario: user switches to Perps tab
    Given user is on any tab other than Perps
    And market data contains multiple assets with various volume formats
    
    When user taps on Perps tab
    Then tab should load faster than before
    And market list should render smoothly without lag
    And price formatting should display correctly
    And volume sorting should work as expected

  Scenario: user views individual asset details
    Given user is on Perps market list
    
    When user taps on any market row item  
    Then LivePriceHeader should render more quickly than before
    And price updates should be smooth and responsive
    And all formatting should display correctly
```

## **Screenshots/Recordings**

### **Before**
Performance issues identified in Margelo analysis:
- `transformMarketData` function takes ~2s causing slow Perps tab
loading
- `LivePriceHeader` takes ~30ms to render due to uncached Intl usage
- `PerpsMarketRowItem` takes ~60ms per render with multiple Intl
instantiations
- `usePerpsMarkets` parseVolume function takes 100-300ms

### **After**
- Replaced all uncached Intl instances with cached formatters
- Added volume parsing cache to avoid repeated string processing
- All existing functionality preserved with optimized performance

## **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 (all existing tests pass - 134+
tests)
- [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.

## **Technical Details**

**Files Modified:**
- `app/components/UI/Perps/utils/marketDataTransform.ts`: Replaced 6
Intl instances with cached formatters
- `app/components/UI/Perps/utils/formatUtils.ts`: Replaced 4 Intl
instances with cached formatters
- `app/components/UI/Perps/hooks/usePerpsMarkets.ts`: Added volume
parsing cache and optimized regex
-
`app/components/UI/Perps/components/TradingViewChart/TradingViewChartTemplate.tsx`:
Added explanatory comment

---------

Co-authored-by: Matthew Grainger <46547583+Matt561@users.noreply.github.com>
## **Description**

When pressing an order from the Perps tab, we were defaulting to the
Positions tab in the detail view. This should respect the type of Order
or Position selected. Meaning, that if a user presses a position, it
should navigate to positions details, if a Limit Order it should
navigate to Order details.

Lastly, if a user doesn't have an order nor a position opened, we should
default to only showing statistics.

## **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: Add initial tab handler to PerpsMarketDetailsScreen

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Perps order navigation

  Scenario: user wants to view order details
    Given they have a limit order opened for a Perp

    When user presses the order from the main Perp page
    Then they should be navigated to the details view, with the Order tab highlighted
```

## **Screenshots/Recordings**


https://github.com/user-attachments/assets/56ac8436-9683-47ce-b2a8-27dc2140aae6

## **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.
<!--
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 a performance trace to measure how long it takes to show the account
address list when navigating from the account actions menu.

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

Related to: <#19218>
Fixes: [MUL-671](https://consensyssoftware.atlassian.net/browse/MUL-671)

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


[MUL-671]:
https://consensyssoftware.atlassian.net/browse/MUL-671?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!--
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**
Resolved following issues with TP/SL bottom sheet on the
`PerpsOrderView` (trade screen):
- Android specific issue where keyboard would render on top of the tp/sl
inputs preventing users from seeing the form.
- When creating a limit order, if the limit price isn't set, we prevent
the user from opening the TP/SL bottom sheet and display a short toast
instructing them to first set a limit price
<!--
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: added toast for limit orders when limit price isn't set
and user tries to configure tp/sl
CHANGELOG entry: fixed android specific issue where keyboard would
render on top of the tp/sl form

## **Related issues**

Fixes: [TAT-1553: Fix 3 issues in TP/SL
interface](https://consensyssoftware.atlassian.net/browse/TAT-1553)

## **Manual testing steps**

```gherkin
Feature: Fixing TP/SL bottom sheet issues

  Scenario: User can see the tp/sl form
    Given user is on Android and is placing a limit order

    When user clicks the tp/sl button and clicks on one of the tp or sl inputs
    Then on-screen keyboard does not block the form
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**


https://github.com/user-attachments/assets/430ef84d-3aa2-49b7-a20d-fb19cf11adba
<!-- [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.
@pull pull Bot locked and limited conversation to collaborators Sep 9, 2025
@pull pull Bot added the ⤵️ pull label Sep 9, 2025
@pull pull Bot merged commit 0bb25b9 into Reality2byte:main Sep 9, 2025
2 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.

10 participants