[pull] main from MetaMask:main#520
Merged
Merged
Conversation
## **Description** Ensure totals are correct for MUSD conversions using `Max` button. - Bump `@metamask/transaction-pay-controller` and handle breaking changes. - Add MUSD, USDC, and USDT on Mainnet and Linea to stablecoin support in `useTokenFiatRates`. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: #25972 ## **Manual testing steps** ## **Screenshots/Recordings** ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Upgrades `@metamask/transaction-pay-controller` with API changes and alters how Max-state is persisted, which could impact confirmation totals and transaction config behavior across networks. > > **Overview** > Fixes USD totals for *stablecoin* payments by treating a broader set of stablecoins as having a fixed `1` USD rate in `useTokenFiatRates` (adds MUSD/USDC/USDT on Mainnet & Linea, plus Polygon USDC.e; replaces per-feature constants with a chain/address allowlist). > > Updates `useTransactionCustomAmount` to reflect breaking changes from bumping `@metamask/transaction-pay-controller` to `^14.0.0`, switching from `setIsMaxAmount` to `setTransactionConfig` for toggling `isMaxAmount`, and adjusts related unit tests/messenger action delegation accordingly. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9d2309c. 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**
Perps tab: regression tests, geo-restriction, and test/lint fixes
Bug regression (7.64 EXP):
PerpsTabView: “See all perps” navigates to market list (not perps home);
Explore includes all categories (crypto, stocks, forex, commodities) and
commodities are not filtered; clear separation between discoverable
markets and positions/orders.
PerpsMarketListView: Market list shows all categories, including
commodities when present.
Geo-restriction (compliance):
PerpsClosePositionView: Uses selectPerpsEligibility; confirm disabled
and geo-block tooltip when not eligible; handleConfirm does not close
position when ineligible.
PerpsSelectModifyActionView: Same eligibility check for reduce/add/flip
actions; ineligible users see geo-block tooltip and do not navigate.
Tests only (no component/UI changes):
PerpsTabView: Connection state tests (connected / disconnected /
loading) for control bar and scroll behavior; strengthened “explore when
no positions/orders” test with copy checks.
Other:
perpsStateMock: PerpsController.isEligible: true by default for tests.
ESLint: Patch applied for deprecated
@typescript-eslint/no-parameter-properties; fixed no-shadow in
PerpsMarketListView.test.tsx mock (use ReactActual).
<!--
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**
> Test-only changes plus additional Engine mocking used in view tests;
low product risk but could affect test reliability if the new Perps
stubs diverge from real controller behavior.
>
> **Overview**
> Adds Perps component *view-test coverage* and supporting test
infrastructure.
>
> Introduces new view tests for `PerpsTabView`, `PerpsMarketListView`,
`PerpsMarketDetailsView`, and `PerpsSelectModifyActionView` to lock in
regressions around “See all perps” navigation, market category
filtering/badges, and geo-restriction behavior (show geo-block bottom
sheet on Close/Modify). To make these tests state-driven, it adds an
`initialStatePerps` preset, a `perpsViewRenderer` that wires Perps
connection/stream providers with controllable stream overrides and
optional extra routes, plus PerpsController Engine stubs and small
typing/docs updates to the component-view test framework.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5604bbf. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Christopher Ferreira <104831203+christopherferreira9@users.noreply.github.com>
Co-authored-by: Christopher Ferreira <christopher.ferreira@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** The bridge token selector currently shows all supported networks as horizontal pills, which doesn't scale as we add more chains. When there are many networks (e.g. 7+), the pill bar becomes crowded and harder to navigate. This PR introduces an overflow pattern: only the top 4 networks are shown as pills, with a "+X more" pill that opens a `NetworkListModal` bottom sheet containing the full list. Selecting a non-visible network from the modal dynamically swaps it into the visible pill bar. Key changes: - **NetworkPills**: Limited to `MAX_VISIBLE_PILLS` (4) with a "+X more" overflow button. Visible set is derived from the first 4 entries in the feature-flag-controlled `chainRanking`. When a non-visible network is selected (via the modal), it's pushed to the front of the visible pills. - **NetworkListModal** (new): A bottom sheet showing all available networks with checkmark selection state, using `Cell` and `BottomSheet` from the component library. - **Redux state**: The network filter (`tokenSelectorNetworkFilter`) was lifted from local `useState` to the bridge Redux slice so it can be shared between `BridgeTokenSelector`, `NetworkPills`, and `NetworkListModal` (which lives on a separate navigation stack). <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Added network pill overflow with "+X more" button that opens a full network list in the bridge token selector ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin **Feature: Network pills overflow in bridge token selector** **Scenario: user sees limited pills with overflow indicator** - Given user opens the bridge token selector (source or dest) - And there are more than 4 supported networks - When the token selector screen loads - Then user sees "All" pill, 4 network pills with icons, and a "+X more" pill - And the "+X more" count reflects the number of hidden networks **Scenario: user opens full network list from overflow pill** - Given user is on the bridge token selector - And the "+X more" pill is visible - When user taps the "+X more" pill - Then a bottom sheet opens showing all available networks - And the currently selected network (or "All") has a checkmark **Scenario: user selects a non-visible network from the modal** - Given user has opened the network list modal - And "Polygon" is not currently visible in the pill bar - When user taps "Polygon" in the modal - Then the modal closes - And "Polygon" appears as the first pill in the bar (replacing the last visible pill) - And the token list filters to show only Polygon tokens **Scenario: user selects "All networks" from the modal** - Given user has a specific network selected - And user has opened the network list modal - When user taps "All networks" - Then the modal closes - And the "All" pill is highlighted - And the token list shows tokens from all networks **Scenario: user taps a visible network pill directly** - Given user is on the bridge token selector - When user taps the "Ethereum" pill - Then the pill is highlighted - And the token list filters to show only Ethereum tokens **Scenario: overflow pill does not appear when few networks exist** - Given there are 4 or fewer supported networks - When the token selector screen loads - Then all networks are shown as pills - And no "+X more" pill is displayed ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches token-selector filtering and search reset behavior and adds new navigation/modal flow; regressions could surface as incorrect token lists or stale search results across network switches. > > **Overview** > Adds an overflow UX to the bridge token selector’s network pills: only the top `MAX_VISIBLE_PILLS` (4) networks are shown, with a localized `+X more` pill that opens a new `NetworkListModal` bottom sheet containing the full network list and selection checkmarks. > > Lifts the token selector’s network filter into the bridge Redux slice via `tokenSelectorNetworkFilter` (with new action + selector) so pills and the modal stay in sync, and updates `BridgeTokenSelector` to initialize/sync/clear this filter and to reset/cancel searches + remount the list when the filter changes from any source. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2149963. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…pressed (#26068) <!-- 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** keep keypad state on flip and close it when dest token input is pressed <!-- 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: keep keypad state on flip and close it when dest token input is pressed ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-4124 ## **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** > UI interaction change limited to keypad open/close behavior plus test-only mocks and snapshot updates; minimal impact outside the Bridge screen. > > **Overview** > Updates `BridgeView` keypad interactions: flipping source/destination tokens now calls `handleSwitchTokens` directly (no forced refocus or `keypadRef.open()`), and pressing the destination amount input explicitly closes the keypad. > > Strengthens test coverage by mocking `BottomSheetDialog` to make close behavior synchronous in JSDOM, adding a regression test for closing the keypad via destination input, and updating the flip test to assert the keypad open/closed state is preserved; snapshots are updated to match UI output changes. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f228f63. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…Menu and legacy Settings (#26032) ## **Description** This PR introduces the `mobileUxAccountMenu` feature flag to enable gradual rollout of the Account Menu feature. Originally we wanted to ship for this RC as is in this [PR](#25611) but we found some UI refinements were needed. The feature is being moved behind a feature flag and be hidden from this current RC and to allow for final design refinements for the next RC. **Why is this change required?** The Account Menu feature requires additional refinements before full release. A feature flag allows us to: - Control rollout via LaunchDarkly - Maintain backward compatibility with existing Settings flow - Iterate on design improvements without blocking the next release **What does this PR do?** Adds `selectAccountMenuEnabled` selector and `useAccountMenuEnabled` hook using the `mobileUxAccountMenu` remote feature flag - Implements conditional navigation: enabled → `AccountsMenuView`, disabled → legacy `Settings` - Hides duplicate sections in Settings when Account Menu is enabled (Permissions, Contacts, About MetaMask, Request Feature, Contact Support, Lock) - Hides SDK section in `SecuritySettings` when Account Menu is enabled - Adds unit tests for both enabled/disabled states - Reverts E2E spec files to pre-Account Menu state to avoid test skipping (4 files: account-syncing-settings-toggle, contact-sync-toggle, sync-users-contacts, test-snap-management). The E2E tests will be added again once the feature is ready ## **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 feature flag mobileUxAccountMenu to control Account Menu rollout ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-397 ## **Manual testing steps** ```gherkin Scenario 1: Feature flag disabled (default behavior) Given the mobileUxAccountMenu feature flag is disabled When I tap the Settings tab in TabBar Then I should navigate to the legacy Settings screen And I should see all sections including Permissions, Contacts, About MetaMask, Request Feature, Contact Support, and Lock And I should see the SDK section in Security Settings Scenario 2: Feature flag enabled (new behavior) Given the mobileUxAccountMenu feature flag is enabled When I tap the Settings tab in TabBar Then I should navigate to the AccountsMenuView screen And the legacy Settings screen should hide duplicate sections (Permissions, Contacts, About MetaMask, Request Feature, Contact Support, Lock) And the SDK section should be hidden in Security Settings ``` ## **Screenshots/Recordings** Feature Flag Off https://github.com/user-attachments/assets/65e9a0a2-8c70-4d84-9f26-302d27d5b1c9 Feature Flag On https://github.com/user-attachments/assets/12503ba2-5219-4783-95c6-0fdef0ac8ecb ### **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches primary navigation paths into Settings and conditionally hides/redirects multiple Settings entries based on a remote flag, so misconfiguration or routing mismatches could strand users or break test flows. > > **Overview** > Adds a new remote, version-gated feature flag (`mobileUxAccountMenu`) via `selectAccountMenuEnabled` + `useAccountMenuEnabled`, and wires it into navigation so the Settings tab/flow can start at either `AccountsMenu` (flag on) or the legacy `Settings` screen (flag off). > > Updates the legacy Settings/Security UI to *avoid duplicate entry points* when the account menu is enabled (e.g., hides Permissions/Contacts/About/feedback/help/lock entries in `Settings`, and hides the SDK connections section in `SecuritySettings`), while adding the missing legacy actions (open support/feature request webviews and lock flow). > > Expands unit tests and snapshots to cover both flag states, and adjusts Detox smoke tests/page objects to navigate to Settings/Contacts without relying on the Account Menu screens. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ad08c93. 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?
-->
## **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**
> Test-only change that tightens a UI assertion; low risk aside from
potential for increased test flakiness if the expected text/id changes.
>
> **Overview**
> Updates the `RedesignedSendView` page object’s
`checkInsufficientFundsError` assertion to verify the error message text
via `Assertions.expectElementToHaveText` (instead of only checking
visibility), improving stability/accuracy of the insufficient-funds
smoke check.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9f85db9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: javiergarciavera <javiergarciavera@users.noreply.github.com>
…26040) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR fixes a UI regression where the "Copy" and "Close" buttons were overlapping in the Message Details bottom sheet of the Signature Request flow. This overlap prevented users from easily dismissing the details view or accessing the copy functionality. **Reason for change:** A recent update to the layout or design system tokens caused the button container to lose its proper spacing/flex configuration, leading to a stack-on-top layout rather than a side-by-side or properly spaced vertical layout. **Improvement/Solution:** Refactored the button container in the Signature Message Details component to use correct flexbox properties. Applied design system tokens for spacing between the action buttons. Ensured the container has adequate padding to prevent overlap with the sheet's edge on smaller devices. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed a UI issue where buttons in the signature message details view were overlapping. ## **Related issues** Fixes: #25783 ## **Manual testing steps** ```gherkin Feature: Signature Message Details Layout Scenario: User views signature message details without button overlap Given the user is on a Signature Request screen with a long message And the "Message details" sheet is expanded When the user scrolls to the bottom of the details sheet Then the "Copy" and "Close" buttons should be displayed side-by-side And the buttons should not overlap or obscure each other And both buttons should be independently tappable ``` ## **Screenshots/Recordings** [copy.webm](https://github.com/user-attachments/assets/bd4eda18-68c9-4ea0-b888-9e11f465a34c) <!-- 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** > UI/layout and test updates only, with a small behavioral change to show a copy button when `copyText` is passed; minimal risk outside confirmations UI. > > **Overview** > Adds an optional `copyText` prop to `Expandable` to render a top-right `CopyButton` inside the expanded modal content, centralizing copy affordance placement for expandable sections. > > Makes `CopyButton` configurable via new `size` and `iconColor` props (with updated snapshot), and updates tests to properly mock async clipboard writes and assert copy-button rendering when `copyText` is provided. The signature message expanded view drops its bespoke copy-button positioning and delegates copying to `Expandable`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a89e636. 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**
**PR summary: Predict claim E2E – stability and geoblock mocking**
_1. Flaky claim button tap (predict-claim-positions.spec.ts)_
Problem: tapClaimButton() sometimes failed because the button wasn’t on
screen.
Cause: Race condition. The test only waited for PredictionsTabContainer.
The claim button is rendered only after the positions API (with
winnings) returns and Redux has wonPositions. The tap could run before
the button was visible.
Change: Wait explicitly for the claim button before tapping:
Assertions.expectElementToBeVisible(WalletView.claimButton, {
description: '...' }) before WalletView.tapClaimButton().
_2. “Unavailable in your region” modal in some runs_
Problem: In some runs the test hit the “Unavailable in your region”
modal and failed.
The default mock is applied in the generic /proxy handler (via _events).
Test-specific mocks (e.g. POLYMARKET_COMPLETE_MOCKS) are registered
first as explicit mockttp rules. By adding the geoblock mock there we
ensure that when the geoblock request hits the mock server it is handled
by a dedicated, high-priority rule for that test, instead of depending
on the generic handler’s order or matching. That reduces flakiness when
the modal appeared in some runs. The response is still the same: we
reuse POLYMARKET_GEOBLOCK_ELIGIBLE from the defaults so there’s a single
source of truth.
<!--
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**
> Changes are limited to E2E test mocks and assertions to reduce
flakiness; no production logic is modified.
>
> **Overview**
> Improves stability of the Predict claim-positions smoke test by
**waiting explicitly for the `claimButton` to render** before tapping,
avoiding a race with positions loading.
>
> Refactors Polymarket geoblock mocking to a shared
`POLYMARKET_GEOBLOCK_ELIGIBLE` constant and registers an explicit
eligible-region geoblock rule in `POLYMARKET_COMPLETE_MOCKS` so
test-specific rules reliably prevent the “Unavailable in your region”
modal.
>
> Updates the Accounts API mock for `supportedNetworks` to hit the `v2`
endpoint and return CAIP-2 style network identifiers (including Solana)
for full/partial support.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
432d287. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…-platform) (#26022) ## **Description** Part 1/4 of #25767 — **Code owner: mobile-platform** This PR extracts analytics data-deletion logic from the `MetaMetrics` singleton into a dedicated `analyticsDataDeletion` utility and `useAnalyticsDataDeletion` React hook. **Why?** The `MetaMetrics` class accumulated responsibilities beyond its core analytics purpose (tracking, flushing, identity). Data deletion (Segment regulation API calls, status polling, StorageWrapper caching) is a distinct concern that belongs in its own module. **What changed:** - **New** `app/util/analytics/analyticsDataDeletion.ts` — pure-function utility owning all deletion state and API calls (previously in `MetaMetrics`). - **New** `app/components/hooks/useAnalyticsDataDeletion/` — React hook exposing `createDataDeletionTask`, `checkDataDeleteStatus`, `getDeleteRegulationCreationDate`, `getDeleteRegulationId`, `isDataRecorded`. - **Updated** `useMetrics` and `useAnalytics` hooks — delegate deletion methods to the new utility instead of calling `MetaMetrics` instance methods. - **Stripped** `MetaMetrics.ts` — removed `configure()`, all 6 deletion methods, and related private state. Interface updated accordingly. - **Updated** `Authentication.ts` — calls `createDataDeletionTask` from the utility instead of via `MetaMetrics`. - **Updated** `sagas/index.ts` — removed `MetaMetrics.configure()` call from `startAppServices`. - **Tests** — full coverage for the new utility and hook; existing MetaMetrics, Authentication, sagas, useMetrics, and useAnalytics tests updated. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: #25767 Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-297 ## **Manual testing steps** ```gherkin Feature: Analytics data deletion Scenario: user requests data deletion from Settings Given the user is on Settings > Security & Privacy When user taps "Delete MetaMetrics data" Then a deletion task is created via Segment regulation API And the deletion status is reflected in the UI ``` ## **Screenshots/Recordings** N/A — no UI changes, internal refactor only. ### **Before** N/A ### **After** **Scenario: user requests data deletion from Settings** No changes ``` (NOBRIDGE) INFO TRACK event saved {"event": "Delete MetaMetrics Data Request Submitted", "properties": {"device_model": "Apple iPhone17,5", "os": "ios", "os_version": "26.2"}, "type": "track"} (NOBRIDGE) INFO Sent 2 events ``` <img height="300" alt="Untitled" src="https://github.com/user-attachments/assets/1d247143-7275-4d1a-9dee-d257c66f072c" /> ## **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** > Touches analytics privacy/data-deletion behavior, including Segment API requests and persisted state/caching, and changes app startup/auth flows that previously invoked `MetaMetrics.configure` and deletion methods. > > **Overview** > **Extracts analytics data-deletion out of `MetaMetrics`.** Adds a new `util/analytics/analyticsDataDeletion` module (with in-memory caching + `fetch` calls to Segment regulations endpoints and persistence via `StorageWrapper`) and a new `useAnalyticsDataDeletion` hook that exposes the same six deletion/recording helpers. > > **Updates callers to stop depending on `MetaMetrics` for deletion/config.** `useAnalytics`/`useMetrics` now delegate deletion/status + `updateDataRecordingFlag` to the new util, `Authentication.deleteUser` triggers deletion via the util, `startAppServices` no longer calls `MetaMetrics.configure`, and `MetaMetrics`/`IMetaMetrics` are stripped of `configure` + all data-deletion state/methods. Tests are updated and expanded to cover the new util/hook and the updated integrations. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b7f50a2. 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?
-->
## **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**
> Workflow-only changes to GitHub Actions permissions and concurrency;
low code risk but could affect CI run frequency/queuing if
misconfigured.
>
> **Overview**
> Fixes the release performance E2E trigger workflow by adding explicit
top-level `permissions` so the reusable `run-performance-e2e.yml`
workflow can request `id-token` and `actions` access.
>
> Updates `run-performance-e2e.yml` concurrency grouping to include
`inputs.build_variant` (defaulting to `rc`), preventing experimental and
release runs from sharing a queue and canceling each other while still
leaving `cancel-in-progress: false`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d578778. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )