Skip to content

[pull] main from MetaMask:main#99

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

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

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Aug 26, 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 : )

xavier-brochard and others added 9 commits August 26, 2025 11:56
<!--
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 bumps the Solana snap. The latest version includes a fix on the
WebSockets lifecycle. Before, we were always opening connections
onStart/onInstall/onUpdate, we were opening connections all the time.
Now we open them only if client is active.

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

A contextual chain selector was introduced in PR #13938 to prepare for
the removal of the global network selector to allow users to select
networks specifically within the send flow context, moving away from the
global network selector pattern. However, after extensive internal
testing, we discovered regressions that impacted the user experience in
the send flow.

**Solution:** Remove the contextual chain selector implementation and
rely on the original global network selector instead within the send
flow. This ensures users can reliably select networks and send assets
without encountering the identified regressions.

Revert PRs: 
#13938 - Send flow with
contextual chain selector
#18042 - Selectors for
the contextual network selector
#18012 - Redux
infrastructure for contextual chain ID for send flow

## **Changelog**

CHANGELOG entry: Reverted contextual chain selector in send flow,
restored global network selector

## **Related issues**

Fixes: #18186
#18180
#18172

## **Manual testing steps**

```gherkin
Feature: Send Flow Network Selection

  Scenario: User sends assets using global network selector
    Given the user opens the send flow
    When the user wants to send assets on different networks
    Then they should have access to the global network selector
    And they can select their preferred network globally
    And the selected network applies across the entire application
    And they can successfully send assets
```

## **Screenshots/Recordings**

Overall Flow


https://github.com/user-attachments/assets/c4de553a-8295-4ab3-bfd6-649fca1715fe

Fixes: Send from token details does not switch network in the send flow
#18186


https://github.com/user-attachments/assets/1b4e3e02-c4a1-46a3-a8fa-0220ba007c3e

Fixes:  NFT issues in send flow #18180


https://github.com/user-attachments/assets/e151da0d-5b5a-4944-8c5f-7b8b7d9050fc

Fixes: After adding a network from the send flow, send flow
inconsistencies #18172


https://github.com/user-attachments/assets/ae5cb2bd-d46a-4168-878a-3b08e07122cd

### **Before**

`~`

### **After**

`~`

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

---------

Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com>
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
De escalate google login error - no credential

Android credential manager throw no credential when there are no account
sign in on device.
Or occasionally not able to find matching account during first login and
able to login afterwards.
This is not blocking error but the error is then throw as sentry capture
error which would cause anxiety to user.

The pr de-escalate with bottom sheet error and allow user to try to
login again with same or other method

This Pr also fixed the issue #18597 as it change the regex checking
method.

<!--
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:
#18556
#18597

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user try login google via android when there is no account signin in android
    Given user's android device do not have any google account

    When user try to login via google
    Then user should not be prompt with sentry error. bottom sheet error should be prompted
```

## **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/185d367f-63c8-4b11-a4c9-6942a25b276f


### **After**

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


https://github.com/user-attachments/assets/af8cb600-d89f-48f6-8be8-f3a85f71f29d


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

<!--
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 adds card.metamask.io to the dapps-url-list file, ensuring it
appears in the MetaMask Mobile internal browser as one of the
recommended websites.

## **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**
<img width="300" height="900"
alt="simulator_screenshot_0339B22A-1890-4EB3-8F60-AA7E40F59A58"
src="https://github.com/user-attachments/assets/4dbc7df3-8b0e-40ca-9256-da1f6ea9622e"
/>

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

### **After**
<img width="300" height="900"
alt="simulator_screenshot_8B7463C4-3F1B-4598-8BDB-953E67C70BCB"
src="https://github.com/user-attachments/assets/6dcd8fc4-b851-4f74-8130-32d0f1d0e599"
/>

<!-- [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 adds a new component `MultichainAccountConnectedList` for the
bip44 dapp connection flow. It is currently not wired up and cannot be
used. The only way to test is to use storybook.

<!--
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: null 

## **Related issues**

Related to:
https://consensyssoftware.atlassian.net/browse/MUL-669?atlOrigin=eyJpIjoiYzNhZGVkYWFhMGUyNDA2Zjg3N2EyZmVjZjJkNWM4YjIiLCJwIjoiaiJ9

## **Manual testing steps**

It is only testable on storybook. 

## **Screenshots/Recordings**



### **After**

<img width="1179" height="2556" alt="Simulator Screenshot - iPhone 15
Pro - 2025-08-25 at 20 52 16"
src="https://github.com/user-attachments/assets/1e129db7-c5e4-4df4-ab32-480661b63da0"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - iPhone 15
Pro - 2025-08-25 at 20 52 22"
src="https://github.com/user-attachments/assets/8786ec60-4271-464b-8aa4-c8ae01d53768"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - iPhone 15
Pro - 2025-08-25 at 20 52 27"
src="https://github.com/user-attachments/assets/dce7508a-daae-4041-b392-b3b6532cf6a5"
/>


<!-- [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.
…n-services controllers (#18726)

<!--
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 updates several MetaMask controller packages.  

---

<details open>
<summary><code>@metamask/eip1193-permission-middleware</code> (from
<code>^0.1.0</code> → <code>^1.0.0</code>)</summary>

- [View
Changelog](https://github.com/MetaMask/core/blob/main/packages/eip1193-permission-middleware/CHANGELOG.md#100)
- **No major breaking changes**  
  - Package is now marked as stable.
- Additional dependency bumps (already in use in client):  
  - `@metamask/controller-utils` → `^11.12.0`  
  - `@metamask/utils` → `^11.4.2`  

</details>

---

<details open>
<summary><code>@metamask/multichain-api-middleware</code> (from
<code>^0.4.0</code> → <code>^1.0.0</code>)</summary>

- [View
Changelog](https://github.com/MetaMask/core/blob/main/packages/multichain-api-middleware/CHANGELOG.md#100)
- **No major breaking changes**  
  - Package is now marked as stable.
- Additional dependency bumps (already in use in client):  
  - `@metamask/multichain-transactions-controller` → `^2.0.0`  
  - `@metamask/controller-utils` → `^11.10.0`  
  - `@metamask/chain-agnostic-permission` -> `^1.0.0`
  - `@metamask/network-controller` -> `^24.0.0`

</details>

---

<details open>
<summary><code>@metamask/notification-services-controller</code> (from
<code>^11.0.0</code> → <code>^16.0.0</code>)</summary>

- [View
Changelog](https://github.com/MetaMask/core/blob/main/packages/notification-services-controller/CHANGELOG.md#1600)
- **No major breaking changes**  
- Peer dependency bump:  
- `@metamask/profile-sync-controller@^23.0.0` (already in use in client)
→ resolves peer dependency warning

</details>

<!--
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: #16555,
#16556,
#17741

## **Manual testing steps**


## **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 refactors the `MultichainAccountSelectorLIst` to accept a list
of selected accounts. There are no UI changes.

<!--
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: null

## **Related issues**

## **Manual testing steps**

```gherkin
Feature: enable multiselect in MultichainAccountSelector

  Scenario: user goes to account list 
    Given multichain account state 2 is enabled

    When user opens the account list
    Then sees that one account is selected. 
```

## **Screenshots/Recordings**

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

There are no behavioural changes in the account list. 

### **After**




https://github.com/user-attachments/assets/d0eeb263-0690-48fa-9718-0cfe456f3179





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

<!--
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 introduces a network selector on the legacy Swap screen so that
it is possible to switch networks.


## **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 network selector for the legacy Swaps screen

## **Related issues**

Fixes #18241 - Swap (legacy) on any other network except Ethereum
Mainnet is not possible

## **Manual testing steps**

```gherkin
Feature: Network selector on legacy Swaps screen

  Scenario: user opens legacy Swaps screen
    When user opens legacy Swaps screen
    Then user is able to switch network
```

## **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/ba50cc0b-9b6b-4958-9da1-6b38416ba8da

### **After**



https://github.com/user-attachments/assets/4401af7e-e29a-4980-8918-1919c2ef3d0c


## **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.
<!--
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 implements deeplink support for the Perps (perpetual futures)
feature, enabling direct navigation to Perps markets from external
sources like marketing campaigns, notifications, and social media.

The implementation supports two main deeplink types:
1. **Perps Market Overview**: Routes users to the main Perps tab (with
tutorial flow for first-time users)
2. **Specific Asset Details**: Routes users directly to a specific perps
asset (e.g., BTC, ETH)

## **Changelog**

CHANGELOG entry: Added deeplink support for Perps markets, allowing
direct navigation to Perps tab and specific asset details

## **Related issues**

Fixes: TAT-1344

## **Manual testing steps**

### Testing Deeplinks

#### iOS Testing
```bash
# Test Perps market overview deeplink
xcrun simctl openurl booted "https://link-test.metamask.io/perps"

# Test specific asset deeplinks
xcrun simctl openurl booted "https://link-test.metamask.io/perps-asset?symbol=BTC"
xcrun simctl openurl booted "https://link-test.metamask.io/perps-asset?symbol=ETH"
xcrun simctl openurl booted "https://link-test.metamask.io/perps-asset?symbol=SOL"
```

#### Android Testing
```bash
# Test Perps market overview deeplink
adb shell am start -W -a android.intent.action.VIEW -d "https://link-test.metamask.io/perps" io.metamask.debug

# Test specific asset deeplinks
adb shell am start -W -a android.intent.action.VIEW -d "https://link-test.metamask.io/perps-asset?symbol=BTC" io.metamask.debug
adb shell am start -W -a android.intent.action.VIEW -d "https://link-test.metamask.io/perps-asset?symbol=ETH" io.metamask.debug
```


https://github.com/user-attachments/assets/d391fca1-be2a-4d65-96b2-2c5f2ef2ae34


### Resetting First-Time User State

To test the tutorial flow for first-time users, you need to reset the
Perps state:

1. **Via Redux DevTools (Development builds):**
   - Open the app with Redux DevTools enabled
   - Navigate to Redux state
   - Find `engine.backgroundState.PerpsController`
   - Set `isFirstTimeUser: { testnet: true, mainnet: true }`

2. **Via Settings Menu:**
   - Go to Settings → Advanced → Reset Account
   - This will reset all account data including Perps state


### Test Scenarios

```gherkin
Feature: Perps Deeplinks Navigation

  Scenario: First-time user navigates via perps deeplink
    Given the user has MetaMask Mobile installed
    And the user has never used Perps before (reset state if needed)

    When user clicks on deeplink "https://link-test.metamask.io/perps"
    Then the app opens to the Perps Tutorial screen
    And after completing or skipping the tutorial, user sees the Perps tab selected

  Scenario: Returning user navigates via perps deeplink
    Given the user has MetaMask Mobile installed
    And the user has completed the Perps tutorial

    When user clicks on deeplink "https://link-test.metamask.io/perps"
    Then the app opens directly to the Wallet home with Perps tab selected

  Scenario: User navigates to specific BTC asset via deeplink
    Given the user has MetaMask Mobile installed

    When user clicks on deeplink "https://link-test.metamask.io/perps-asset?symbol=BTC"
    Then the app opens directly to the BTC perps market details screen

  Scenario: User navigates to specific ETH asset via deeplink
    Given the user has MetaMask Mobile installed

    When user clicks on deeplink "https://link-test.metamask.io/perps-asset?symbol=ETH"
    Then the app opens directly to the ETH perps market details screen

  Scenario: User navigates with invalid asset symbol
    Given the user has MetaMask Mobile installed

    When user clicks on deeplink "https://link-test.metamask.io/perps-asset?symbol=INVALID"
    Then the app opens to the Perps tab (fallback behavior)

  Scenario: Tutorial skip navigates correctly from deeplink
    Given the user is a first-time Perps user
    And the user arrived via deeplink

    When user skips the tutorial
    Then the app navigates to Wallet home with Perps tab selected
    And the user can see the Perps markets list
```

### Expected Results

1. **First-time users**: Should see the tutorial carousel with 6 steps,
then navigate to Perps tab
2. **Returning users**: Should navigate directly to Wallet home with
Perps tab selected
3. **Asset deeplinks**: Should open the specific market details view
4. **Invalid symbols**: Should fallback to Perps markets list
5. **Tab selection**: The Perps tab should be visually selected and
active after navigation

## **Screenshots/Recordings**

### **Before**
- No deeplink support for Perps feature
- Users had to manually navigate to Perps tab through the app

### **After**
- Direct deeplink navigation to Perps markets
- Support for specific asset deeplinks (BTC, ETH, SOL, etc.)
- Smart routing based on user state (tutorial vs direct navigation)


https://github.com/user-attachments/assets/28b55198-995a-4e55-abc1-6715e528d9ac


## **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.
@pull pull Bot locked and limited conversation to collaborators Aug 26, 2025
@pull pull Bot added the ⤵️ pull label Aug 26, 2025
@pull pull Bot merged commit bc12958 into Reality2byte:main Aug 26, 2025
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.

8 participants