Skip to content

[pull] main from MetaMask:main#428

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

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

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Dec 19, 2025

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

tommasini and others added 11 commits December 19, 2025 17:34
<!--
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?
-->

## **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]
> Enforces biometrics/passcode mutual exclusivity using currentAuthType
as source of truth, hides the other toggle, and updates tests for
visibility and state handling.
> 
> - **Settings UI (`LoginOptionsSettings.tsx`)**:
> - Enforce mutual exclusivity: when `BIOMETRIC` is enabled, force
`passcode` off (and hidden); when `PASSCODE` is enabled, force
`biometrics` off (and hidden).
> - Initialize choices from `Authentication.getType()` (source of
truth), overriding inconsistent storage (`BIOMETRY_CHOICE_DISABLED`,
`PASSCODE_DISABLED`).
> - Update toggle handlers to disable the opposite option, handle
password prompts, and manage loading states; conditionally render
toggles (`!passcodeChoice` / `!biometryChoice`).
> - **Tests (`LoginOptionsSettings.test.tsx`)**:
> - Add cases covering toggle visibility, mutual exclusivity, and
precedence of `currentAuthType` over storage.
> - Adjust storage mocks for `PASSCODE_DISABLED`,
`BIOMETRY_CHOICE_DISABLED`; verify disabled states during loading and
remember-me.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6404090. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.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**

The purpose of this PR is to update the browserstack capabilities
`buildIdentifier`.

## **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]
> Allow env override for `buildName` and set empty `buildIdentifier` on
GitHub Actions in BrowserStack capabilities.
> 
> - **E2E/BrowserStack config
(`e2e/framework/services/providers/browserstack/BrowserStackConfigBuilder.ts`)**:
> - `bstack:options.buildName`: now uses
`process.env.BROWSERSTACK_BUILD_NAME` if set, else defaults to
``${projectName} ${platformName}``.
> - `bstack:options.buildIdentifier`: now empty string on CI
(`GITHUB_ACTIONS === 'true'`), otherwise `process.env.USER`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8bc8b2b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
# docs: improve deeplinking documentation and add developer tooling

## Description

This PR significantly improves the deeplinking documentation and adds
developer tooling to make it easier for developers to create new
deeplink handlers. The changes address several outdated sections in the
documentation and provide a streamlined workflow for handler creation.

### What Changed

1. **Documentation Updates** (`docs/readme/deeplinking.md` &
`docs/readme/deeplinking-graphs.md`):
- Fixed incorrect file path references (removed non-existent
`ParseManager` folder references)
- Updated action types table with all 20+ supported actions and correct
handler function names
- Corrected protocol handling flow to show unified `handleUniversalLink`
routing
   - Updated swap URL format to CAIP-19 standard
   - Documented SDKConnectV2/MWP early interception
- Added missing actions: `deposit`, `home`, `create-account`,
`perps-markets`, `perps-asset`, `predict`, `enable-card-button`, SDK
actions
- Clarified invalid signature behavior (demotes to public link, not
invalid modal)
- Updated Mermaid flow diagrams with correct handler names and new
scenarios
- Fixed "Adding New Handlers" guide to show correct standalone function
pattern

2. **New Developer Tooling**:
- **`.cursor/rules/deeplink-handler-guidelines.mdc`**: Comprehensive
guide covering:
     - Step-by-step handler creation process
     - Common pitfalls and how to avoid them
     - Testing strategies
     - Integration checklist
- **`.cursor/commands/create-deeplink-handler.md`**: Cursor command that
generates:
     - Handler file with proper TypeScript interfaces
     - Complete test file with common test cases
     - Integration code snippets for manual steps
     - Ready-to-run test commands

### Why

The deeplinking documentation had several inaccuracies that could
mislead developers:
- Incorrect file paths leading to confusion
- Missing actions in the supported actions table
- Outdated handler patterns (showing class methods that don't exist)
- Missing critical information about SDKConnectV2 handling

Additionally, creating new deeplink handlers required manual work across
multiple files with no clear guidance, leading to common mistakes like
forgetting the switch case (as seen with `perps-asset` action).

### Context

This work was done as part of improving developer experience for the
deeplinking system. The documentation updates ensure accuracy, and the
new tooling reduces friction when adding new handlers.

CHANGELOG entry: improve developer docs related to deeplinking

## Related Issues

N/A - Documentation and developer tooling improvements

## Manual Testing

### Test Cases

**Scenario: Verify documentation accuracy**
- Given: A developer reading the deeplinking documentation
- When: They follow the file paths referenced in the docs
- Then: All file paths should


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Refreshes deeplinking docs with corrected flows, formats, and
supported actions, and adds a Cursor command plus guidelines to generate
new deeplink handlers with tests and integration steps.
> 
> - **Documentation**:
> - **Flow & Protocols**: Updates routing to unify `metamask://`/HTTP(S)
under `handleUniversalLink`; adds early SDKConnectV2/MWP interception;
clarifies protocol-specific handlers (`wc://`, `ethereum://`,
`dapp://`).
> - **Security & Modals**: Clarifies signature handling (invalid →
public), modal bypass conditions (whitelists, URLs, in‑app sources), and
domain validation.
> - **Actions & Handlers**: Expands supported actions list with correct
handler names, CAIP‑19 swap format, and notes missing `perps-asset`
switch case; adds updated Mermaid diagrams and scenario examples.
> - **Dev References**: Fixes file paths (to `handlers/legacy/*`),
updates code examples, and refreshes links in “Adding New Handlers,”
verification, and testing sections.
> - **Developer Tooling**:
> - Adds `.cursor/rules/deeplink-handler-guidelines.mdc` (step-by-step
handler pattern, pitfalls, tests, checklist).
> - Adds `.claude/commands/create-deeplink-handler.md` (generates
handler + Jest tests, integration snippets, and test commands).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e14a7e3. 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?
-->

During the execution of `getInternalAccountByAddress` it can happen that
the `Engine` is not yet available to be used, this PR update how the
method is used by waiting for the component to be rendered

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: http://github.com/MetaMask/metamask-mobile/issues/22969

## **Manual testing steps**

Not applicable

## **Screenshots/Recordings**

Not applicable

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Use state with useEffect to fetch `account` from
`getInternalAccountByAddress` based on `selectedAddress`, allowing for
`undefined` until available.
> 
> - **RevealPrivateCredential
(`app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx`)**:
> - Replace immediate `getInternalAccountByAddress(selectedAddress)`
call with `useState` + `useEffect` to set `account` when
`selectedAddress` changes.
> - Gate rendering so `AccountInfo` shows only when `account` exists;
tolerate `account` being `undefined`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b15a430. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ible items (#24162)

<!--
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 the border radius styling in the Perps Order View to
dynamically adjust based on which items are visible in the order details
section.


## **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 rounded corners in Perps order screen when there
are more than 2 rows displayed

## **Related issues**

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

## **Manual testing steps**

```gherkin
Feature: Perps Order View border radius

  Scenario: User views market order with TP/SL visible
    Given user is on the Perps Order View for a market order
    And TP/SL section is visible

    When user views the order details section
    Then Leverage row should have only top corners rounded
    And TP/SL row should have only bottom corners rounded

  Scenario: User views market order with TP/SL hidden
    Given user is on the Perps Order View for a market order
    And TP/SL section is hidden

    When user views the order details section
    Then Leverage row should have all corners rounded
```

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->
See screenshots here
https://consensyssoftware.atlassian.net/browse/TAT-2191

### **After**

<!-- [screenshots/recordings] -->
<img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17
Pro - 2025-12-18 at 16 08 03"
src="https://github.com/user-attachments/assets/ee0b72c7-c5f9-438b-af3e-f79f60cd2f3c"
/>


## **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]
> Adjusts `PerpsOrderView` to conditionally apply top/bottom/all corner
rounding to order detail rows depending on limit price and TP/SL
visibility.
> 
> - **UI (Perps Order View)**
> - Update
`app/components/UI/Perps/Views/PerpsOrderView/PerpsOrderView.tsx` to
conditionally style order detail rows:
> - Leverage row now uses `styles.detailItemFirst` when `orderForm.type
=== 'limit'` or `!hideTPSL`, else `styles.detailItemOnly`.
> - Limit price row applies `styles.detailItemLast` when `hideTPSL` is
true.
> - Ensures correct rounded corners when limit price and/or TP/SL rows
are shown/hidden.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
02612d2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

The TradingView chart y-axis was displaying more decimal places than
needed for price labels, while the header displayed prices correctly
with trailing zeros stripped.


## **Changelog**

CHANGELOG entry: Fixed inconsistent price formatting on TradingView
chart y-axis that showed unnecessary trailing zeros


## **Related issues**

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

## **Manual testing steps**

```gherkin
Feature: Perps TradingView Chart Price Formatting

  Scenario: user views chart for a low-priced asset
    Given user is on the Perps market details screen for a low-priced asset (e.g., a token priced at $0.01234)

    When user views the TradingView chart
    Then the y-axis price labels should not display unnecessary trailing zeros
    And the y-axis price format should match the header price format

```

## **Screenshots/Recordings**

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

### **Before**

See here https://consensyssoftware.atlassian.net/browse/TAT-2208
<!-- [screenshots/recordings] -->

### **After**
<img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17
Pro - 2025-12-19 at 12 52 50"
src="https://github.com/user-attachments/assets/435719f0-9eae-414a-b076-36d1f32c9b22"
/>


## **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]
> Y-axis price labels now strip trailing zeros to match header
formatting in the TradingView chart.
> 
> - **Chart Price Formatting**
> - Update `localization.priceFormatter` in
`app/components/UI/Perps/components/TradingViewChart/TradingViewChart.html`
and `TradingViewChartTemplate.tsx` to strip trailing zeros after Intl
formatting, aligning Y-axis labels with header formatting.
> - Preserves dynamic decimal precision logic; only post-format cleanup
added.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
45bef0c. 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**
https://consensyssoftware.atlassian.net/browse/CARD-215
https://consensyssoftware.atlassian.net/browse/CARD-215
Implement confirm modal for card onboarding

<!--
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: Implement modal for user already has a Card account

## **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] -->
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2025-12-14 at 21 58 50"
src="https://github.com/user-attachments/assets/7a9d155f-eb82-405b-b3c1-0943c0c3bace"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2025-12-14 at 21 57 19"
src="https://github.com/user-attachments/assets/36937c82-0713-49de-8c3e-c37fec726277"
/>

## **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]
> Adds a reusable confirm modal and updates card onboarding to handle
existing accounts, exit/keep-going flows, refined initial routing, and
session resumption via SDK.
> 
> - **Card Onboarding UX**:
> - **New `ConfirmModal`**: Introduced reusable bottom-sheet modal
(`ConfirmModal.tsx`) with button, icon, and close behaviors; wired into
modals stack (`Routes.CARD.MODALS.CONFIRM_MODAL`).
> - **Existing-account flow**: `ConfirmEmail` now opens `CONFIRM_MODAL`
with title/description/icon and confirms to `Routes.CARD.AUTHENTICATION`
when `hasAccount` is true; removes toast-based notice.
> - **Exit/Keep-going**: Replaced KYC webview close handling with
`PostEmailNavigationOptions` (exit confirmation to
`Routes.WALLET.HOME`), and added `KYCStatusNavigationOptions` (direct
exit). Shows a "keep going" confirm modal for returning sessions to
resume at the computed step.
> - **Initial route logic**: Refined `OnboardingNavigator` initial route
selection for `UNVERIFIED`, `PENDING`, `VERIFIED`, and `REJECTED`
states; fetches user on mount only when onboardingId pre-existed.
> - **KYC Failed**: Now resets onboarding state on mount and returns to
wallet home via close.
> - **SDK**:
> - Added `isReturningSession` (captured at provider mount) and guarded
auto-fetch to avoid races when onboardingId is set later; set
`contactVerificationId` from `getRegistrationStatus`.
> - **Routing/Strings**:
> - Added `Routes.CARD.MODALS.CONFIRM_MODAL`; registered modal in card
routes.
> - Added i18n for account-exists, exit confirmation, and keep-going
copies; adjusted confirm email strings.
> - **Tests**:
> - Comprehensive updates and new tests for modal behavior, navigator
routing/options, SDK race prevention/session flag, and address forms
mocking `isReturningSession`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a424394. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Bruno Nascimento <brunonascimentodev@gmail.com>
Co-authored-by: Bruno Nascimento <bruno.nascimento@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**

This PR improves the multichain wallet connection UX by defaulting to
all available chain permissions (cross ecosystem) when a user is
connecting via the EVM provider (with no specific chain permissions
specified) and via the Solana Wallet Standard, reducing redundant
permission prompts and wonky connection UX.

**Key changes:**
• On EVM provider requests, all supported Solana chains are now
preselected by default alongside EVM chains.
• On Solana Wallet Standard requests, all supported EVM chains are
preselected alongside Solana chains.
• Dapp-specified chain scopes are still honored — broader preselection
only occurs when the request does not explicitly limit chains.

<!--
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: Improved initial cross ecosystem connection flows by
preselecting all supported chains (EVM + Solana) when connecting through
injected providers.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-890

## **Manual testing steps**

```gherkin
Feature: Improve cross system connection UX

  Scenario: user requests for permission on Uniswap
    Given no permissions exist

    When user connects to uniswap
    Then should see that he is connected to both EVM and Solana chains (without two separate connection prompts)
```

## **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/e705ece0-4a6d-46b7-bbae-b02e054fe4a3

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

### **After**


https://github.com/user-attachments/assets/9254c433-2d67-489f-9661-3c55c6874940

<!-- [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]
> Preselects all supported non-Tron networks for EIP-1193-without-chains
or Solana Wallet Standard requests, filtering out wallet namespace and
refining default selection logic.
> 
> - **MultichainAccountConnect (`MultichainAccountConnect.tsx`)**:
> - Detects Solana Wallet Standard requests via `SolScope.Mainnet` and
`KnownSessionProperties.SolanaAccountChangedNotifications`.
> - Defaults selected networks to all supported (plus currently selected
testnet), excluding `Tron`, when:
>     - EIP-1193 request with no explicit chains, or
>     - Solana Wallet Standard request.
>   - Filters out `Wallet` namespace from `requestedCaipChainIds`.
> - Refactors default selection flow and updates memo dependencies
accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
69ca58e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Alex Donesky <adonesky@gmail.com>
…nality (#23487)

<!--

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 comprehensive override functionality to the
`RemoteFeatureFlagController` that was added iby bumping
remote-feature-flag-controller to version 3.1.0, allowing developers and
users to locally override remote feature flags for testing and debugging
purposes. The implementation also includes enhanced A/B test visibility
features that provide access to available test groups.

**What is the reason for the change?**
The need to override remote feature flags locally for development,
testing, and debugging scenarios without modifying the remote
configuration.

**What is the improvement/solution?**
- Added local override system that takes precedence over remote flags
- Enhanced state management to track both remote flags and local
overrides separately
- Added A/B test raw flag storage to provide visibility into available
test groups
- Implemented comprehensive API methods for managing overrides and
accessing flag information

## **Changelog**

CHANGELOG entry: Added override functionality to remote feature flags
with methods to set and clear overrides and access A/B test groups

## **Related issues**

Fixes: 

## **Manual testing steps**

Feature: Remote Feature Flag Override Functionality

  Scenario: user sets a local override for a feature flag
Given the RemoteFeatureFlagController is initialized with remote flags
    When user calls setFlagOverride('testFlag', true)
    Then testFlag selector should return the override value true
    And getFlagOverride('testFlag') should return true

  Scenario: user clears a specific flag override
    Given a feature flag has a local override set
    When user calls clearFlagOverride('testFlag')
    Then testFlag selector should return the original remote value
    And getFlagOverride('testFlag') should return undefined

  Scenario: user accesses A/B test groups
    Given remote flags contain A/B test configurations
    When user calls rawProcessedRemoteFeatureFlags selector
Then it should return an array of available test groups with names and
values

## **Screenshots/Recordings**

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

### **Before**

<!-- No override functionality existed - users could only access
processed remote flags -->

### **After**

<!-- Users can now set local overrides, access raw A/B test data, and
manage flag states independently -->


https://github.com/user-attachments/assets/225f41fc-7073-4e5a-9c07-35e22460f12e



https://github.com/user-attachments/assets/9933bc3c-9dcb-4e60-9267-57e6d85dbd01


## **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]
> Adds local override support and A/B test handling for feature flags
across selectors, context, UI, and stats; updates controller to v3.1.0.
> 
> - **State/Selectors**:
> - Merge local overrides into `selectRemoteFeatureFlags`; add
`selectLocalOverrides`, `selectRawFeatureFlags`, and
`selectRawRemoteFeatureFlags`.
> - Seed initial/background state and logs with `localOverrides` and
`rawRemoteFeatureFlags`.
> - **Context** (`FeatureFlagOverrideContext`):
> - Refactor to read flags via selectors and call Engine methods
(`setFlagOverride`, `removeFlagOverride`, `clearAllFlagOverrides`).
> - Expose `featureFlags`, `featureFlagsList`, `overrides`, and
`getOverrideCount`; remove description/getter utilities.
>   - Bulk-send raw flags to metrics on change.
> - **Utils** (`util/feature-flags`):
> - Introduce `FeatureFlagType` enum; detect new types: `boolean
nested`, `boolean with minimumVersion`, `abTest`.
>   - Keep version support check; remove description helper.
> - **UI** (`FeatureFlagOverride`):
> - Support new types: boolean, boolean nested, minimumVersion, arrays,
objects, and A/B tests (select options from raw flags).
> - Improve input editing/reset syncing; show `Clear All Overrides
(count)` and filtered counts; boolean filter updated.
> - **Stats Hook**:
>   - Count booleans across types; add `abTest` to stats.
> - **Tests**:
> - Comprehensive updates for context, selectors, UI behaviors, version
gating, A/B tests, and stats.
> - **Dependencies**:
>   - Bump `@metamask/remote-feature-flag-controller` to `^3.1.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
04dea27. 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**
### Bug
This PR fixes an app crash caused by the mUSD conversion flow.. When
navigating away from the conversion screen, we didn't reject the
transaction (`onReject`) which caused subsequent redirects to the
redesigned confirmations to render the conversion screen and crash due
to missing route params.

### Fix
The mUSD conversion flow now extends `useNavbar` to ensure transactions
are rejected when navigating away (e.g. via back button).

### Changes
- Add render overrides options to `useNavbar` to allow experiences to
customize their confirmations navbars while still inheriting behaviour
(e.g. `onReject` called when clicking back button)
<!--
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 mUSD conversion flow not rejecting transactions
when navigating away

## **Related issues**

Fixes: [MUSD-151: Stale mUSD conversion transaction not cleared causing
app crash](https://consensyssoftware.atlassian.net/browse/MUSD-151)

## **Manual testing steps**

```gherkin
Feature: mUSD Conversion Navbar

  Scenario: user navigates back from mUSD conversion confirmation
    Given user is on the mUSD conversion confirmation screen

    When user taps the back button
    Then the pending mUSD conversion transaction is rejected
    And user returns to the previous screen
```

## **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/d178ecdb-e703-44eb-8402-bdbc1daa6be6

### **After**

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


https://github.com/user-attachments/assets/a481fc63-50e5-4f38-a103-7086f3df742f

## **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]
> Introduces navbar render overrides and migrates mUSD conversion to a
new hook using them, removes old navbar options, updates routes, and
expands tests.
> 
> - **Confirmations UI**:
> - **Navbar overrides**: Extend `getNavbar` to accept `overrides`
(`headerTitle`, `headerLeft(onBackPress)`, `headerTitleAlign`,
`headerStyle` merged) with default center alignment.
> - **Hook update**: `useNavbar(title, addBackButton, overrides)` now
forwards overrides;
`getEmptyNavHeader`/`useEmptyNavHeaderForConfirmations` aligned; tests
added for overrides and defaults.
> - **mUSD Conversion**:
> - **New hook**: Add `useMusdConversionNavbar(chainId)` rendering
`MUSD` icon with network `Badge` and a back `ButtonIcon`; passes
`chainId` to `getNetworkImageSource`.
> - **Integration**: `MusdConversionInfo` calls
`useMusdConversionNavbar(outputChainId)` and retains `useAddToken`;
tests added.
>   - **Cleanup**: Remove `Navbars/musdNavbarOptions.tsx` and its tests.
> - **Navigation**:
> - Use `useEmptyNavHeaderForConfirmations` for
`Routes.FULL_SCREEN_CONFIRMATIONS.REDESIGNED_CONFIRMATIONS`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9eca8af. 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**
https://consensyssoftware.atlassian.net/browse/CARD-239
Implement new design for authentication screen
<!--
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**

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] -->
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2025-12-15 at 12 16 28"
src="https://github.com/user-attachments/assets/bdc6166d-12e2-4676-8dd1-76db6c4e176b"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2025-12-15 at 11 48 28"
src="https://github.com/user-attachments/assets/f2b63601-6e5c-4703-827d-17f725a90167"
/>

## **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]
> Redesigns the Card login with OnboardingStep and testIDs, updates OTP
resend UX, improves onboarding country defaults, enhances Add Funds swap
copy with chain name, and tightens auth hook error handling and strings.
> 
> - **Card Authentication (UI/UX)**:
> - Refactors `CardAuthentication` to use `OnboardingStep`, Tailwind
classes, and testIDs; removes `CardAuthentication.styles`.
> - Updates OTP entry to a single `TextField`, auto-submit at
`CODE_LENGTH`, and adds resend cooldown (“didn’t receive code /
resend”); adjusts error surfacing.
> - Simplifies navigation (login → home/onboarding), adds signup CTA,
and replaces flag/US copy ("United States").
> - **Onboarding improvements**:
> - `SetPhoneNumber`, `PersonalDetails`, `PhysicalAddress`: derive
`selectedCountry` from user/regions when Redux is empty and persist via
`setSelectedCountry`; sync area code/emoji; add `autoComplete="email"`
in `SignUp`.
> - **Add Funds (Bottom Sheet)**:
> - Enriches swap description with chain name via
`mapCaipChainIdToChainName`.
>   - `useOpenSwaps`: pass `sourceToken`/`destToken` to `goToSwaps`.
> - **Auth Hook**:
> - Clears errors before actions; sets/clears OTP error/loading around
`sendOtpLogin` and `login`.
> - **Tests**:
> - Update to new UI/testIDs and strings; remove style/CodeField mocks;
add SDK mock where needed; refresh snapshots.
> - **i18n**:
> - Tweaks authentication/OTP strings (titles, US label, resend
messages); updates swap description template.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e9a64ad. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Bruno Nascimento <bruno.nascimento@consensys.net>
@pull pull Bot locked and limited conversation to collaborators Dec 19, 2025
@pull pull Bot added the ⤵️ pull label Dec 19, 2025
@pull pull Bot merged commit e5d6249 into Reality2byte:main Dec 19, 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.

9 participants