Skip to content

[pull] main from MetaMask:main#640

Merged
pull[bot] merged 11 commits into
Reality2byte:mainfrom
MetaMask:main
Mar 30, 2026
Merged

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

Conversation

@pull

@pull pull Bot commented Mar 30, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


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

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

Akaryatrh and others added 11 commits March 30, 2026 11:41
…cp-7.72.0 (#27884)

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

### Summary
This PR addresses the recurring `Cannot read property "network" of
undefined` error encountered by some users during the offramp flow.

### Context
The issue was identified via multiple user reports and there was already
a [previous
fix](consensys-vertical-apps/va-mmcx-onramp-api#894)
for a similar issue. Users reported that after being redirected back
from the provider's widget to the MetaMask app, the application crashed.
This issue is a blocker for users.

More info can be found on this Slack
[thread](https://consensys.slack.com/archives/C03P2H287N2/p1771581292456779).

### Changes
Added defensive checks to ensure the network object is properly
initialized before access.

### Next actions
Investigation is ongoing with providers to understand why `crypto`
object could be missing in some occasion on order data.

## **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: prevent app crash caused by missing crypto object from
order data

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-3393
Ongoing investigation:
https://consensyssoftware.atlassian.net/browse/RAMP-451

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

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


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk defensive null-checking in `SendTransaction` plus tests; main
behavior change is the screen and send action now no-op/return null when
required crypto/network data is missing, which could hide the CTA for
malformed orders but prevents crashes.
> 
> **Overview**
> Prevents the offramp `SendTransaction` screen from crashing when an
order returns without `cryptoCurrency` (or missing
`cryptoCurrency.network`).
> 
> `transactionAnalyticsPayload` now uses optional chaining for
provider/payment/currency fields, and `handleSend` early-returns if
`chainId` is unavailable; the view also returns `null` when
`cryptoCurrency` is missing.
> 
> Adds/updates tests to cover missing/partial order data (including
analytics assertions and ensuring `addTransaction` is not invoked) and
refreshes snapshots accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bdd0b0f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@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**

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

Remove BIP-44 remote feature flag internal logic

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

## **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]
> **Medium Risk**
> Removes remote/version-gated feature-flag checks and forces multichain
accounts state 2 on, which could unintentionally enable behavior for all
users/environments and bypass rollout safeguards.
> 
> **Overview**
> **Multichain accounts feature-flag gating has been removed.**
`isMultichainAccountsRemoteFeatureEnabled`,
`isMultichainAccountsState2Enabled`, and
`selectMultichainAccountsState2Enabled` now unconditionally return
`true`, eliminating remote flag, app-version, and local override logic.
> 
> Tests were simplified to assert the new always-enabled behavior, and
related constants/type-guards/helpers were deleted.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c5bda50. 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**

Adds the segment metric event "Market Insights Closed" to the Market
Insights view, for the back button.

## **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]
> **Low Risk**
> Low risk analytics-only change; main risk is accidental
over/under-counting if `handleBackPress` is triggered from additional
paths.
> 
> **Overview**
> Adds a new MetaMetrics event, `MARKET_INSIGHTS_CLOSED` (`Market
Insights Closed`), to the central analytics event registry.
> 
> Updates `MarketInsightsView` so pressing the back button tracks this
close event with the same asset identifier properties
(`caip19`/`perps_market`, optional `digest_id`, and `asset_symbol`)
before navigating away.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8c77a02. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

<!-- 1. What is the reason for the change? The fallback URL for
`DIGEST_API_URL` was pointing at the development endpoint. -->
<!-- 2. What is the improvement/solution? Switch the hardcoded fallback
to the production endpoint so that builds without an explicit env var
hit production. -->

Switches the hardcoded fallback value for `DIGEST_API_URL` in
`AppConstants.ts` from the dev endpoint
(`digest.dev-api.cx.metamask.io`) to the production endpoint
(`digest.api.cx.metamask.io`).

Also moves the `@metamask/sdk-communication-layer` import to the top of
the file to follow alphabetical import ordering.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

N/A

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

<!-- Generated with the help of the pr-description AI skill -->

Made with [Cursor](https://cursor.com)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only changes a constant fallback URL and import ordering.
Main impact is that builds without `DIGEST_API_URL` will now call the
production digest service instead of the dev endpoint.
> 
> **Overview**
> Updates `AppConstants.DIGEST_API_URL` to default to the production
`https://digest.api.cx.metamask.io/api/v1` endpoint when the
`DIGEST_API_URL` env var is not set.
> 
> Also reorders the `DEFAULT_SERVER_URL` import to match expected import
ordering.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9d584a4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ig (#28046)

## **Description**

Wires up the confirmation UI and post-quote logic so that
`perpsWithdraw` transactions go through the correct gasless HyperLiquid
withdrawal flow via Relay.

This is the second of two PRs for Perps Withdraw (follows the first one
which added activity/display support).

### Changes

- **Post-quote config** (`useTransactionPayPostQuote`): Sets
`isHyperliquidSource = true` for perps withdrawals, skips `refundTo`
(funds go HyperCore → Relay directly, no Safe proxy involved)
- **Custom amount** (`useTransactionCustomAmount`): Sources available
balance from `PerpsController.state.accountState.availableBalance` for
perps withdrawals
- **Insufficient balance alert** (`useInsufficientBalanceAlert`):
Suppresses the "not enough ETH for gas" alert for `perpsWithdraw` since
the withdrawal is gasless
- **Confirmation UI**: Adds `perpsWithdraw` to
`TRANSACTION_TYPES_DISABLE_ALERT_BANNER`,
`HIDE_FOOTER_BY_DEFAULT_TYPES`, and `GO_BACK_TYPES`
- **Bridge fee row**: Shows withdraw-specific tooltip text and "Provider
fee" label for `perpsWithdraw`
- **Metrics** (`useTransactionPayMetrics`): Includes `perpsWithdraw` in
pay metrics tracking
- **TPC bump**: Bumps `@metamask/transaction-pay-controller` to
`^19.0.0` which includes the HyperLiquid submission logic

### Core dependency

- [feat(transaction-pay-controller): add HyperLiquid withdrawal
submission via Relay](MetaMask/core#8314)

## **Changelog**

CHANGELOG entry: Add Perps Withdraw confirmation flow

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1115

## **Manual testing steps**

~~~gherkin
Feature: Perps Withdraw confirmation flow

  Scenario: user withdraws from HyperLiquid Perps to any token
    Given the user has a funded HyperLiquid Perps account
And the user navigates to the Perps Withdraw page via Developer Options

    When user enters a withdrawal amount
    And selects a destination token (e.g. BNB)
    Then the transaction fee is shown with a tooltip
    And no "Insufficient funds" alert is displayed
    And the available Perps balance is shown correctly

    When user confirms the withdrawal
    Then the withdrawal completes successfully
    And the transaction appears in the Activity list as "Perps withdraw"
~~~

## **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**
> Adds new `perpsWithdraw` handling across confirmation UI and
Transaction Pay configuration, and bumps
`@metamask/transaction-pay-controller` to a new major version;
regressions could affect withdrawal routing, fee display, or
gasless/sponsored alerting.
> 
> **Overview**
> Enables a dedicated confirmation + payment flow for `perpsWithdraw`
transactions, including **post-quote configuration** that marks
withdrawals as Hyperliquid-sourced and skips `refundTo`.
> 
> Updates confirmation UX/behavior to treat `perpsWithdraw` like other
special flows (hide footer/alert banner by default, adjust back
navigation), **suppresses insufficient-gas alerts** for gasless
withdrawals, and adds a withdraw-specific transaction-fee tooltip
string. Also extends pay metrics (`mm_pay_use_case`) and custom-amount
percentage calculations to use Perps available balance.
> 
> Separately bumps CI iOS bundle-size threshold (53→54) and updates
fixtures/snapshots for new controller state fields; upgrades
`@metamask/transaction-pay-controller` to `^19.0.0` (with associated
lockfile churn).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f9ec71e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Signed-off-by: dan437 <80175477+dan437@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**

<!--
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]
> **Low Risk**
> Low risk: changes are confined to QA metrics collection and a
scheduled GitHub Actions workflow, but it adds a `yarn install` +
`ts-node` execution step that could fail if dependencies or paths drift.
> 
> **Overview**
> **Adds feature-flag E2E coverage reporting to QA stats.** The QA stats
collector now runs a new `ts-node`-based scanner
(`tests/feature-flags/feature-flag-coverage-report.ts`) that parses
`tests/smoke`/`tests/regression` for references to
`FEATURE_FLAG_REGISTRY`, classifies per-flag coverage
(full/partial/default-only), writes
`tests/artifacts/feature-flag-coverage-report.json`, and emits
aggregated metrics under a new `feature_flags` namespace in
`qa-stats.json`.
> 
> The `qa-stats.yml` scheduled workflow is updated to cache/install Yarn
dependencies (required for `ts-node`) and to upload the feature-flag
coverage JSON as a separate artifact.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
27ecb4f. 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**
* Add seedless onboarding performance tests
* Jira: https://consensyssoftware.atlassian.net/browse/TO-272
<!--
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: Seedless onboarding performance tests.

  Scenario: Android seedless onboarding perf project runs with mock OAuth env
    Given BrowserStack credentials and onboarding Android build are configured
    When someone runs the test for Android onboarding seedless 
    Then seedless-apple and/or seedless-google perf specs execute 

  Scenario: iOS seedless onboarding perf project runs with mock OAuth env
    Given BrowserStack credentials and onboarding iOS build are configured
    When someone runs the test for iOS onboarding seedless
    Then seedless perf specs complete and timers reflect the documented steps

```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**
<img width="1119" height="131" alt="Screenshot 2026-03-30 at 12 10
24 PM"
src="https://github.com/user-attachments/assets/63e9ed26-b667-41df-b027-f7a138a23e8f"
/>




https://github.com/user-attachments/assets/566ad76b-217a-4d51-b89f-9a4c05b3f09a



https://github.com/user-attachments/assets/263d59be-d467-455c-996f-a1ebd3019efc


<!-- [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]
> **Low Risk**
> Adds new Appwright performance tests and extends a screen object to
support Appwright interactions; production app code is untouched, with
minimal risk limited to potential test flakiness from updated
selectors/tap behavior.
> 
> **Overview**
> Adds two new Appwright performance specs that measure end-to-end
*seedless onboarding* timings for **Apple** and **Google** social login,
including post-OAuth handling, password creation, metrics consent, and
first wallet render.
> 
> Introduces a new `SocialLoginScreen` screen object for iOS
post-OAuth/new-user and account-status screens, and updates
`OnboardingSheet` Apple/Google login selectors and tap methods to
support both legacy (WDIO) and Appwright (`device`-aware) execution.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
50f2215. 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**
Updating the Earn team in CODEOWNERS to point to `@MetaMask/earn`.
<!--
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: Update Earn team name to @MetaMask/earn in codeowners

## **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]
> **Low Risk**
> Low risk because this only changes CODEOWNERS mappings and does not
affect runtime code or behavior; the main impact is review/approval
routing for Earn- and staking-related paths.
> 
> **Overview**
> Updates `.github/CODEOWNERS` to replace the deprecated
`@MetaMask/metamask-earn` ownership with `@MetaMask/earn` for
Earn-related paths (including `**/earn/**`, `**/Earn/**`, and
`**/money/**`) and for `confirmations/external/staking` co-ownership
with the Confirmations team.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d68b210. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
… to parent views (#28049)

## **Description**

This PR refactors how `OndoCampaignDetailsView` decides which sections
to render, replacing ad-hoc inline conditions with a single `useMemo`
that computes five boolean flags. It also replaces
`CampaignEntriesClosedBanner` with `RewardsInfoBanner` for a unified
visual treatment.

### Other changes

- `OndoLeaderboard`: new `showTitle` prop (default `true`) — parent can
suppress the section title when rendering inline. `computedAt` timestamp
moves to sit alongside the tier-tabs row instead of a standalone header
row.
- `OndoLeaderboardPosition`: new `showTitle` (default `false`) and
`computedAt` props — full leaderboard view opts in to a header with a
"last updated" timestamp.
- `OndoPortfolio`: skeleton now shows when loading with an empty
positions array (not just when portfolio is `null`).
- `CampaignTile`: Enter Now badge is gated behind
`isOptinAllowed(campaign)` so it disappears once the deposit cutoff has
passed.
- `useGetOndoLeaderboard` is now called unconditionally with
`campaignId` instead of a computed conditional ID, since all render
paths need leaderboard data.

## **Changelog**

CHANGELOG entry: null


## **Screenshots/Recordings**

Phase 1 - Opt in guidance

<img width="1444" height="132" alt="image"
src="https://github.com/user-attachments/assets/78fff8c4-ea9b-4292-9876-1f80c66b29ad"
/>

<img width="722" height="1229" alt="image"
src="https://github.com/user-attachments/assets/e36e6278-baa4-47f4-8477-ec92c58f5288"
/>

---

Phase 1 - Opted in & Position Guidance & Leaderboard

<img width="1585" height="210" alt="image"
src="https://github.com/user-attachments/assets/d5c58171-9933-4485-89f3-f9832b2d16f4"
/>

<img width="947" height="1774" alt="Screenshot from 2026-03-30 14-46-51"
src="https://github.com/user-attachments/assets/84792f98-96b5-476f-8c2c-2c409cd86260"
/>

---

Phase 1 - Opted in & at least one position

<img width="1585" height="246" alt="image"
src="https://github.com/user-attachments/assets/9026da48-ee64-4ea0-8d2c-78d42802da3d"
/>

<img width="934" height="1778" alt="Screenshot from 2026-03-30 14-35-38"
src="https://github.com/user-attachments/assets/c4c7a81e-ad75-435f-8f60-8db979f282d4"
/>

---

Phase 2 - Not Opted in & cut off date reached

<img width="1203" height="244" alt="image"
src="https://github.com/user-attachments/assets/3e52588d-2f4a-4e89-a824-f494612442f5"
/>

<img width="934" height="1778" alt="Screenshot from 2026-03-30 14-41-17"
src="https://github.com/user-attachments/assets/6103fd3a-9372-4fa7-becb-f9392517a780"
/>

---

Phase 2 - Opted in & cut off date reached  & No positions

<img width="1523" height="398" alt="image"
src="https://github.com/user-attachments/assets/22bddf1b-7db4-4e26-86a1-03c046ca8912"
/>

<img width="934" height="1778" alt="Screenshot from 2026-03-30 14-41-17"
src="https://github.com/user-attachments/assets/6103fd3a-9372-4fa7-becb-f9392517a780"
/>

---

Phase 2 - Opted in & cut off date reached  & positions

<img width="934" height="1778" alt="Screenshot from 2026-03-30 14-35-38"
src="https://github.com/user-attachments/assets/c4c7a81e-ad75-435f-8f60-8db979f282d4"
/>

---

Completed - Not opted in or opted in and no positions

<img width="1523" height="240" alt="image"
src="https://github.com/user-attachments/assets/db179fdb-2e0e-4902-a5bf-80be2a7305c8"
/>

<img width="941" height="1811" alt="Screenshot from 2026-03-30 13-39-10"
src="https://github.com/user-attachments/assets/bcfad4e3-1dca-47ce-8ad6-e9a83ec69fbd"
/>

---

Completed - opted in and at least one position

<img width="1444" height="298" alt="image"
src="https://github.com/user-attachments/assets/41cb2e04-ca8a-4157-b3c5-5b3e0c9b7e9f"
/>

<img width="941" height="1811" alt="Screenshot from 2026-03-30 13-50-02"
src="https://github.com/user-attachments/assets/71652bc4-f6cb-477f-bfe7-60d2fc236449"
/>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Refactors the Ondo rewards screens’ section-gating and data-fetch
paths (leaderboard/portfolio/position), which can affect what users see
and when network calls happen, but does not touch auth or core
transaction flows.
> 
> **Overview**
> Improves Ondo rewards screens by **lifting
`useGetOndoPortfolioPosition` and `useGetOndoLeaderboardPosition` calls
into the parent views** and passing data/loading/error state down into
`OndoPortfolio` and `OndoLeaderboardPosition`, removing their internal
hook/selector coupling.
> 
> `OndoCampaignDetailsView` now computes a single set of boolean flags
to control *How it works*, portfolio, leaderboard, and position
sections, replaces the old entries-closed banner with a unified
`RewardsInfoBanner`, and fetches leaderboard data unconditionally for
the campaign. `OndoLeaderboardView` similarly wires in the position hook
and renders leaderboard/position components without duplicated titles.
> 
> UI behavior tweaks: `CampaignTile` hides the “Enter now” label when
opt-in is closed, `OndoLeaderboard` adds `showTitle` and adjusts where
the “updated at” timestamp renders (including single-tier), and
`OndoPortfolio` shows a skeleton when loading with an empty positions
array. Copy updates add new competition-closed strings and rename the
portfolio title in `en.json`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9477e99. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
## **Description**

The TypeScript language server (vtsls/tsserver) crashes or runs out of
memory in editors when working on this repo. Root cause: two identical
741KB webpack bundles (`scripts/inpage-bridge/dist/index.js` and
`app/core/InpageBridgeWeb3.js`) are included in the TypeScript project
via `include` globs. These are minified single-line files that provide
zero value to type-checking but force tsserver to parse ~759K characters
and infer types for the entire bundled module graph.

This PR:
1. **Excludes the two 741KB bundles** from type-checking by adding them
to `exclude` — saves ~345MB peak RSS
2. **Enables `incremental: true`** — allows tsc/tsserver to cache type
information between runs. Warm runs drop from ~63s/7.4GB to ~10s/3.5GB
3. **Fixes `.gitignore` glob** for `.tsbuildinfo` files —
`*.tsbuildinfo` catches any filename generated by incremental builds

### Benchmark results (10 iterations, measured with `tsc
--extendedDiagnostics` + `/usr/bin/time -l`):

| Config | Peak RSS | Total Time | Errors |
|---|---|---|---|
| Baseline (`scripts/**/*`, no excludes) | 7,422 MB | 63.0s | 0 |
| + Exclude both bundles | 7,217 MB | 66.8s | 0 |
| + Exclude both bundles + `incremental` (cold) | 7,330 MB | 64.0s | 0 |
| **+ Exclude both bundles + `incremental` (warm)** | **3,538 MB** |
**10.2s** | **0** |

Note: The CI `lint:tsc` script already uses `--max-old-space-size=8192`
(8GB heap). Most editor LSPs default to 3-4GB, which is insufficient for
this project's 17K+ file type graph. These changes reduce the memory
footprint and dramatically improve warm startup times.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: N/A

## **Manual testing steps**

```gherkin
Feature: TypeScript type-checking

  Scenario: tsc passes with no regressions
    Given the developer is at the repo root

    When developer runs `yarn lint:tsc`
    Then type-checking completes with zero errors

  Scenario: incremental compilation produces cache
    Given the developer is at the repo root
    And no tsconfig.tsbuildinfo file exists

    When developer runs `yarn lint:tsc` twice
    Then a tsconfig.tsbuildinfo file is created after the first run
    And the second run completes significantly faster (~10s vs ~60s)

  Scenario: excluded bundles are not type-checked
    Given the developer is at the repo root

    When developer runs `yarn tsc --listFiles --noEmit`
    Then the output does not contain scripts/inpage-bridge/dist/index.js
    And the output does not contain app/core/InpageBridgeWeb3.js
```

## **Screenshots/Recordings**

N/A — configuration-only change with no UI impact.

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk configuration-only change; main impact is on editor/CI
TypeScript type-check performance and the set of files included in
type-checking.
> 
> **Overview**
> Improves TypeScript developer ergonomics by **enabling `incremental`
compilation** and updating `.gitignore` to ignore all generated
`*.tsbuildinfo` caches.
> 
> Reduces `tsserver`/`tsc` load by **excluding large bundled artifacts**
(`app/core/InpageBridgeWeb3.js` and `scripts/inpage-bridge/dist`) from
the `tsconfig.json` project so they are no longer parsed/type-checked.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d1d5673. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## Summary

- Adds a new component view test for the gasless swap error state in
`BridgeView`
- Sets up a gasless swap scenario (ETH→USDC on the same chain with
`gasFeesSponsoredNetwork` enabled for `0x1`) and a `quoteFetchError` in
`BridgeController` to trigger the error banner
- Asserts the error banner appears after the quote fetch failure, then
verifies it dismisses correctly when the user presses close (paired
positive + negative assertions)
- 
---

> [!NOTE]
> **Low Risk**
> Low risk: adds a UI view test only, exercising an error-state banner
and its dismissal without changing production logic.
> 
> **Overview**
> Adds a new `BridgeView.view` test covering the *gasless swap* error
state by simulating a `BridgeController.quoteFetchError` with sponsored
gas enabled and asserting the generic error banner renders.
> 
> The test also verifies the banner can be dismissed via the close icon
and is removed from the screen afterward.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
00688c8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@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 2ac4f44 into Reality2byte:main Mar 30, 2026
2 of 14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.