Skip to content

[pull] main from MetaMask:main#639

Merged
pull[bot] merged 9 commits intoReality2byte:mainfrom
MetaMask:main
Mar 30, 2026
Merged

[pull] main from MetaMask:main#639
pull[bot] merged 9 commits intoReality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 30, 2026

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

smgv and others added 9 commits March 30, 2026 08:25
…wind CSS (#27929)

<!--
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 migrates the ResetPassword view away from legacy
StyleSheet.create()-based styling toward the MetaMask design system and
Tailwind CSS. Also migrated to `Typescript` as a functional component.

Jira Link: https://consensyssoftware.atlassian.net/browse/TO-639

## **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: migrate reset-password to design system components and
Tailwind CSS

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Settings Reset Password Flow

  Scenario: user changes password
    Given existing password login

    When user update password
    The new password will be used.
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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



https://github.com/user-attachments/assets/7431d641-712c-48cb-9e6b-41379cb91e9c

<img width="431" height="915" alt="Screenshot 2026-03-30 at 12 43 46 PM"
src="https://github.com/user-attachments/assets/5c475ad1-4c8e-455b-9949-27b310491e71"
/>

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

- [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]
> **Medium Risk**
> Refactors a security-sensitive password reset flow (reauthentication,
vault recreation, biometrics/seedless handling) and rewrites UI/layout,
so regressions could break password changes or edge-case error handling
despite test updates.
> 
> **Overview**
> Migrates `ResetPassword` from a legacy class-based `index.js` +
`StyleSheet` implementation to a new TypeScript functional component
(`index.tsx`) built on MetaMask design-system primitives and Tailwind
classes.
> 
> Keeps the same reset flow (confirm current password → set new
password), but rewires state management to hooks, updates
biometric/seedless initialization and error-handling paths, and
preserves analytics/notifications/navigation behavior.
> 
> Updates the Jest snapshot and significantly rewrites/expands tests to
exercise the new component structure, including form validation,
password visibility toggles, learn-more navigation, loading/back-button
behavior, and seedless-specific warning/error modals.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
abe6f25. 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**

UI update for the Market Insights entry card, and adds the skeleton
piece as well.

<img width="398" height="148" alt="Screenshot 2026-03-27 at 11 19 11"
src="https://github.com/user-attachments/assets/ba8a7c7a-234b-453a-8baf-b4f9304f10ba"
/>


https://github.com/user-attachments/assets/5ded82fe-65cd-4f5a-837f-cacdb98e5a78

## **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: 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**
> Moderate UI/animation refactor (Reanimated/SVG worklets, timed
carousel) that could introduce visual regressions or extra
render/animation cost, plus conditional rendering changes for loading
states.
> 
> **Overview**
> Updates the Market Insights entry card presentation: adds gradient
“chrome” styling (title, sparkle, arrow), replaces the static body copy
with a rotating `SlidingTextCarousel` of trend descriptions (falls back
to summary), and tweaks layout/interaction from `Pressable` to
`TouchableOpacity`.
> 
> Refactors `AnimatedGradientBorder` to use a trail-aligned animated SVG
gradient and a new `animationKey` trigger (re-fires on visibility and on
carousel slide starts), with new polyline-based border sampling to align
dash offset with gradient head/tail.
> 
> Introduces `MarketInsightsEntryCardSkeleton` (and new
`ENTRY_CARD_SKELETON` test id) and updates Token Details + Perps Market
Details to show the skeleton while insights are loading, otherwise hide
the section when not loading and no report.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6e5a52c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Xavier Brochard <xavier.brochard@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**

**Reason:** Users with **no mUSD balance** but a **claimable Merkl
bonus** only saw the claim flow after drilling into the aggregated mUSD
row / asset overview. The home **Cash** empty state did not surface a
claim action, and claim failures could occur with little feedback.

**Solution:**

- **`CashGetMusdEmptyState`** (homepage Cash section and Cash full view
empty state): wires **`useMerklBonusClaim`** with shared
**`LINEA_MUSD_ASSET_FOR_MERKL`**, shows a full-width secondary **Claim**
CTA when there is a claimable reward and no pending claim.
- **Button copy** uses **`earn.claim_bonus_with_fiat`** so the label
includes the amount formatted with **`formatWithThreshold`** +
**`getLocaleLanguageCode()`**, converting Merkl’s USD amount with the
same **USD → selected fiat** basis as the mUSD price row
(`oneUsdInUserFiat` from mainnet currency rates).
- **Errors** from **`useMerklClaimTransaction`** are surfaced via
**`useMerklBonusClaim`** as **`error`** and a **plain toast** on the
empty state when a claim attempt fails.
- **`useMerklClaimTransaction`**: if the first Merkl fetch returns no
reward data, **clears the in-memory Merkl cache** and **retries once**
to avoid stale empty cache vs. display.
- **`MusdAggregatedRow`**: reuses **`LINEA_MUSD_ASSET_FOR_MERKL`** from
constants; **row press** always navigates to **Mainnet mUSD asset
details** (no longer branches to Cash full view when the user has mUSD).
- **Tests** for `CashGetMusdEmptyState`, `useMerklBonusClaim`,
`useMerklClaimTransaction`, and **Homepage** mocks updated as needed.
- **Locales**: `claim_bonus_with_fiat` (and aligned keys where added)
for the new string.


## **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 a Claim bonus action on the home Cash section
when users have no mUSD but have a claimable Merkl bonus, with the
amount shown in the selected fiat currency.

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Cash section claim bonus when wallet has no mUSD

  Scenario: User with no mUSD and claimable Merkl bonus sees claim CTA on home
    Given mUSD conversion Cash is enabled and the user is geo-eligible
    And the user has no mUSD balance on supported chains
    And Merkl reports a claimable mUSD bonus above the minimum threshold
    When the user views the Wallet home screen
    Then the Cash section shows the empty "Get mUSD" state
    And a secondary button is shown whose label starts with "Claim" and includes a formatted fiat amount

  Scenario: User taps Claim bonus from Cash empty state
    Given the Claim bonus button is visible on the Cash empty state
    When the user taps the Claim bonus button
    Then the wallet proceeds with the Merkl claim flow (e.g. transaction confirmation) when reward data is available
    Or a toast appears with an error message when the claim cannot be completed

  Scenario: Cash full view empty state
    Given the user opens the Cash token list full view with no mUSD balance
    And a claimable bonus exists
    Then the same Claim bonus control is available with consistent labeling
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**
<img width="393" height="840" alt="Screenshot 2026-03-24 at 15 06 10"
src="https://github.com/user-attachments/assets/499f503d-cc24-43b5-83f9-c7ebf282d9a4"
/>

<!-- [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**
> Adds a new claim path in the Cash empty-state UI and changes Merkl
claim fetching to clear cache and retry, which could affect user flows
and network/API behavior but is limited to the mUSD/Merkl feature area.
> 
> **Overview**
> Adds a secondary **“Claim bonus”** CTA to the Cash (mUSD) empty state
(homepage + full view) when a Merkl bonus is claimable, including
fiat-formatted amount labeling and analytics tracking; claim failures
now surface as a toast.
> 
> Extends `useMerklBonusClaim` to expose an `error` from
`useMerklClaimTransaction`, and updates `useMerklClaimTransaction` to
**clear the Merkl in-memory cache and retry once** when the initial
rewards fetch returns no data.
> 
> Refactors Cash mUSD components to share a `LINEA_MUSD_ASSET_FOR_MERKL`
constant and adjusts `MusdAggregatedRow` navigation to always open
mainnet mUSD asset details; updates tests, mocks, locale string
(`earn.claim_bonus_with_fiat`), and API-mocking defaults for Merkl
rewards.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
550636c. 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 migrates the OnboardingSheet toward the MetaMask design system.
## **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: migrate OnboardingSheet to design system component

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: BottomSheet for Wallet Creation/Onboarding

  Scenario: user clicks on `Create  a new wallet / I have an existing wallet button`
    Then BottomSheet appears with the login options.
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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



https://github.com/user-attachments/assets/05005037-8824-4ac4-b216-660c8a5d513c



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

- [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]
> **Medium Risk**
> Swaps the underlying `BottomSheet` implementation and wiring, which
can subtly change sheet dismissal/back navigation behavior and layout
across platforms.
> 
> **Overview**
> Migrates `OnboardingSheet` from the in-repo deprecated `BottomSheet`
to the `@metamask/design-system-react-native` `BottomSheet`, updating
the import and passing `navigation.goBack` via the new `goBack` prop.
> 
> Updates Jest snapshots to reflect the design-system bottom sheet
structure/style output (notably overlay/container layout and flex/style
prop normalization) for both *create* and *import* modes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
296db77. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Removes the `mobileUxAccountMenu` remote feature flag and makes the
account menu permanently enabled in mobile. This eliminates runtime
gating for the hamburger/account-menu experience and prevents future
remote flag toggles from changing behavior.

## **Changelog**

CHANGELOG entry: Removed the hamburger menu feature flag and permanently
enabled the account menu.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-456

## **Manual testing steps**

```gherkin
Feature: Account menu is always enabled

  Scenario: Open account menu from settings navigation
    Given the wallet is unlocked on the main home view
    When I tap the Settings tab in bottom navigation
    Then the Accounts Menu view is displayed

  Scenario: Open account menu from wallet header
    Given the wallet is unlocked on the main home view
    When I tap the hamburger menu button in the wallet header
    Then the Accounts Menu view is displayed
```

## **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]
> **Medium Risk**
> Changes navigation and UI entry points around Settings/Accounts Menu,
which can break deep links, back stacks, and tests if any flows still
expect the legacy Settings root or removed buttons.
> 
> **Overview**
> Makes the Accounts Menu permanently enabled by removing the
`mobileUxAccountMenu` remote feature flag (including its selectors/tests
and registry entry) and deleting related flag-constant wiring.
> 
> Updates navigation so the bottom Settings tab and `SettingsFlow`
always start at `Routes.ACCOUNTS_MENU_VIEW`, and trims the legacy
`Settings` and `SecuritySettings` screens by removing entries/sections
now considered part of the Accounts Menu (e.g., SDK connections,
contacts/permissions/about/support/request feature/lock).
> 
> Adjusts wallet header behavior and extensive E2E/test coverage to use
the Accounts Menu as the new entry point for actions like notifications,
contacts, and locking the app.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8077076. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Patryk Łucka <PatrykLucka@users.noreply.github.com>
…vent missing network errors (#27484)

## **Description**

Ensures the Arbitrum network exists before every perps deposit
transaction, preventing `No network client found for chain` errors when
users haven't added Arbitrum to their wallet.

**Problem:** `ensureArbitrumNetworkExists()` was previously called at
individual call sites (button handlers, redirect screens), making it
easy to miss entry points. Notably, `PerpsOrderRedirect` — reachable
from Token Details without mounting `PerpsHomeView` — had the check
removed, causing deposits to fail when Arbitrum wasn't present.
Additionally, the `useFocusEffect` call in `PerpsHomeView` had no
`.catch()` handler, creating unhandled promise rejections when the
network addition failed.

**Solution:**
1. **Centralized the network check** in `usePerpsTrading` — both
`depositWithConfirmation()` and `depositWithOrder()` now call `await
ensureArbitrumNetworkExists()` before invoking the controller. Every
caller is automatically covered.
2. **Kept a preemptive warm-up** in `PerpsHomeView`'s `useFocusEffect`
with a `.catch()` handler so the network is added before the user taps
deposit, avoiding latency.
3. **Removed redundant checks** from `PerpsOrderRedirect`,
`usePerpsHomeActions` (deposit and withdraw handlers), and
`usePerpsBalanceTokenFilter`.
4. **Updated tests** to mock `usePerpsNetworkManagement` where needed
due to the new transitive dependency.

## **Changelog**

CHANGELOG entry: Fixed a bug where depositing into Perps from Token
Details could fail if the Arbitrum network had not been added to the
wallet

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2716
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2715
 
## **Manual testing steps**

```gherkin
Feature: Perps deposit with Arbitrum network guarantee

  Scenario: User deposits from Token Details without Arbitrum in wallet
    Given the user has NOT added the Arbitrum network to their wallet
    And the user is viewing a perps-eligible token on Token Details

    When the user taps the deposit/trade button
    Then the Arbitrum network is automatically added
    And the deposit transaction is created successfully
    And the user is navigated to the confirmation screen

  Scenario: User deposits from Perps Home with Arbitrum already added
    Given the user has the Arbitrum network in their wallet
    And the user is on the Perps Home screen

    When the user taps "Add Funds"
    Then the deposit proceeds without delay
    And no duplicate network addition occurs

  Scenario: User lands on Perps Home without Arbitrum
    Given the user has NOT added the Arbitrum network
    
    When the user navigates to the Perps Home screen
    Then the Arbitrum network is silently added in the background
    And no error is shown if the addition fails
```

## **Screenshots/Recordings**

N/A — no UI changes, logic-only fix.

### **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**
> Moves the Arbitrum network precondition into core perps deposit
entrypoints, affecting all deposit flows; failures or timing changes
could impact transaction creation and navigation to confirmations.
> 
> **Overview**
> **Centralizes Arbitrum network setup for deposits.** `usePerpsTrading`
now calls `ensureArbitrumNetworkExists()` inside both
`depositWithConfirmation` and `depositWithOrder`, so every perps deposit
path enforces the network prerequisite.
> 
> **Removes redundant pre-checks at call sites and hardens navigation
timing.** Callers like `PerpsOrderRedirect`, `usePerpsHomeActions`, and
`usePerpsBalanceTokenFilter` no longer manually gate on the network
check; `PerpsHomeView` keeps a *best-effort warm-up* on focus with an
added `.catch()` to avoid unhandled rejections, and
`PerpsMarketDetailsView` triggers `navigateToConfirmation` inside the
deposit try/catch.
> 
> **Tests/presets updated for new transitive dependency.** Multiple
perps view/hook tests add or adjust mocks for
`usePerpsNetworkManagement`, add `waitFor` where async ordering changed,
and the perps state preset now includes an Arbitrum network
configuration to keep view tests stable.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
18ee027. 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 adds a new action which determines whether a pull request in the
merge queue is up-to-date, meaning:

- The pull request is based on the latest commit on `main`.
- The pull request is the first in the merge queue.

In this case, all status checks have already passed on the branch, and
running in the merge queue would be redundant, meaning we can skip the
merge queue checks.

The same thing was implemented in the extension here:
MetaMask/metamask-extension#38966

## **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**
> Changes CI behavior for `merge_group` events by conditionally skipping
most checks, which could let an incorrect “up-to-date” determination
bypass required validations if the action/logic is wrong.
> 
> **Overview**
> Adds a new `check-skip-merge-queue` job to detect when a PR in the
merge queue is already up-to-date (and first in queue) via
`MetaMask/github-tools`.
> 
> When that flag is true, most CI jobs (lint/test/dedupe/workflow
checks/bundle size and smart E2E selection) are **skipped** during
`merge_group` runs, and `check-all-jobs-pass` treats the workflow as
passed to avoid redundant merge-queue executions.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e04991a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ment (#27348)

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

- Suppress insufficient balance alerts when a fiat payment method is
selected - the user is buying with fiat, not spending from token balance
- Add fiat-specific "no quotes" alert detection: triggers when a fiat
method is selected with a valid amount but no quotes are returned
- Hide bridge time estimate row when fiat is selected — timing is
communicated via payment method delay in the Pay-With row
- Amount input calls `updateFiatPayment` instead of `updateTokenAmount`
when fiat is selected, and percentage quick-pick buttons are hidden
- Add `hidePercentageButtons` prop to `DepositKeyboard` for fiat mode

## **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: MetaMask/MetaMask-planning#7069

## **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**
> Changes confirmation amount submission and alert/row visibility logic
when a fiat payment method is selected, which can affect when
transactions are considered valid/blocking. Risk is moderate due to
user-facing confirmation flow changes and new branching based on fiat
state.
> 
> **Overview**
> **Fiat payment mode is now handled as a distinct path in
confirmations.** When a fiat payment method is selected, the amount
"Done" action updates fiat payment state via
`TransactionPayController.updateFiatPayment` instead of committing a
token amount.
> 
> **UI and alerts adapt to fiat selection.** `DepositKeyboard` gains
`hidePercentageButtons` (and tests) to hide percentage quick-picks in
fiat mode, `BridgeTimeRow` no longer renders when a fiat method is
selected, `useInsufficientPayTokenBalanceAlert` returns no alerts under
fiat selection, and `useNoPayTokenQuotesAlert` now also triggers a
blocking "no quotes" alert for fiat when a valid fiat amount is entered
but quotes/source amounts are empty (with added test coverage).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
caa29fe. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…nd errors (#27409)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

When editing Take Profit / Stop Loss (TP/SL) for an existing Perps
position, the `onConfirm` callback relied on a ref
(`currentPositionRef.current`) to get the position at execution time. If
the position was updated during navigation (e.g. via WebSocket), the ref
could be stale, causing "No position found" errors when the user
confirmed TP/SL.

This change extends the TP/SL `onConfirm` signature to accept an
optional first argument `position`. The TPSL view now passes the
position from route params into `onConfirm`, and the market-details flow
uses that passed position when present, falling back to the ref. Order
flow and market-tabs callbacks were updated to match the new signature
(they ignore the position argument). This ensures the callback always
receives the correct position and avoids the stale-ref error.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

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

## **Manual testing steps**

```gherkin
Feature: Perps TP/SL confirmation

  Scenario: user confirms TP/SL for an existing position without "No position found" error
    Given user has an open Perps position and navigates to edit TP/SL (market details or market tabs)
    And the position data may have been updated (e.g. via WebSocket) before user taps Confirm

    When user sets Take Profit and/or Stop Loss and taps Confirm

    Then TP/SL is updated successfully and no "No position found" error is shown
```

## **Screenshots/Recordings**

N/A (behavioral fix; no UI 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**
> Changes the `PerpsTPSL` route `onConfirm` callback signature/return
type and updates multiple callers, so mismatches could break TP/SL
confirmation flows if any usage is missed.
> 
> **Overview**
> Fixes a TP/SL confirmation race by **passing the `position` from
`PerpsTPSLView` into the route `onConfirm` callback**, and having
`PerpsMarketDetailsView` prefer that position (falling back to
`currentPositionRef`) before calling `handleUpdateTPSL`.
> 
> Updates the `PerpsTPSL` navigation type and all known callers
(`PerpsOrderView`, `PerpsMarketTabs`) to match the new `(position?, tp?,
sl?, trackingData?)` signature, adjusts TPSL view tests accordingly, and
adds a market-details test asserting `{ success: false }` when confirm
runs after the position is cleared.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ee47f9c. 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 Mar 30, 2026
@pull pull Bot added the ⤵️ pull label Mar 30, 2026
@pull pull Bot merged commit e4c7d07 into Reality2byte:main Mar 30, 2026
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.

6 participants