Skip to content

[pull] main from MetaMask:main#334

Merged
pull[bot] merged 5 commits into
Reality2byte:mainfrom
MetaMask:main
Nov 18, 2025
Merged

[pull] main from MetaMask:main#334
pull[bot] merged 5 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Nov 18, 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 : )

matthewwalsh0 and others added 5 commits November 18, 2025 12:12
## **Description**

Validate the raw source amount in MetaMask Pay after quotes are
retrieved.

Also validate the source network fee using the max raw amount, rather
than the estimated USD value.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:
[#6263](MetaMask/MetaMask-planning#6263)
#22722

## **Manual testing steps**

## **Screenshots/Recordings**

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

- [ ] 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]
> Validates MetaMask Pay source amounts and max network fees using new
totals fields, consolidates insufficient-fee alerts, updates fee
displays/metrics, and bumps transaction-pay-controller to v7.
> 
> - **Confirmations / Pay**:
> - **Validation & totals**: Use
`totals.fees.sourceNetwork.estimate.usd` for displayed network fees and
validate fees with raw amounts (`sourceAmount.raw` +
`fees.sourceNetwork.max.*`).
> - **Alerts**: Add `AlertKeys.InsufficientPayTokenFees`; fold
native-fee checks into `useInsufficientPayTokenBalanceAlert`; remove
`useInsufficientPayTokenNativeAlert`; update alert metrics mapping and
alert filtering; rename prop to `pendingAmountUsd`.
> - **UI**: `BridgeFeeRow` sums provider + source network estimate +
target network; tooltip network fee uses estimate.
> - **Metrics**: `mm_pay_network_fee_usd` now from
`fees.sourceNetwork.estimate.usd`; strategy/quote metrics unchanged.
> - **Tokens**: `useTokenWithBalance` now exposes `balanceRaw`.
> - **Selectors**: Default `selectTransactionPayTokensByTransactionId`
to `[]`.
> - **I18n**: Update `insufficient_pay_token_balance_fees.message` copy.
> - **Dependencies**: Bump `@metamask/transaction-pay-controller` to
`^7.0.0`.
> - **Tests**: Update/add tests for new fee fields, alerts, metrics, and
token balance raw support.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7a2c188. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…counts cp-7.60.0 (#22649)

## **Description**

This will automatically fix corrupted states if users have desync'd
accounts.

This should mitigate some errors that were spotted with the rewards
system where some Solana address could not be registered.

## **Changelog**

CHANGELOG entry: Automatically re-sync accounts between Snaps and
MetaMask

## **Related issues**

- #22869

## **Manual testing steps**

```gherkin
Feature: Re-synchronize accounts

  Scenario: user cannot register its Solana accounts to the rewards system
    Given it fails to register at least 1 account

    When user locks and unlocks its wallet
    Then the accounts will get re-synchronized and the user will be able to register its accounts properly
```

## **Screenshots/Recordings**

### **Before**

<img width="300" height="700" alt="Simulator Screenshot - iPhone 16 Plus
- 2025-11-07 at 18 56 59"
src="https://github.com/user-attachments/assets/3389a237-70e4-44ba-8a47-8971a3fabf25"
/>
<img width="300" height="700" alt="Simulator Screenshot - iPhone 16 Plus
- 2025-11-07 at 18 53 03"
src="https://github.com/user-attachments/assets/397bb80d-b4d1-41ca-863d-a84b70f4969f"
/>

### **After**

<img width="300" height="700" alt="Simulator Screenshot - iPhone 16 Plus
- 2025-11-07 at 18 56 59"
src="https://github.com/user-attachments/assets/c61bd44f-ffc9-46c0-9489-91a3e5dc59a5"
/>
<img width="300" height="700" alt="Simulator Screenshot - iPhone 16 Plus
- 2025-11-07 at 18 57 06"
src="https://github.com/user-attachments/assets/faad36e3-bf00-482e-8d79-4fb0f3985256"
/>


## **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]
> Runs background account resync and HD wallet discovery after login
(state 2), updates tests, and bumps `@metamask/solana-wallet-snap` to
`^2.4.7`.
> 
> - **Authentication (post-login flow)**:
> - Introduces `postLoginAsyncOperations()` executed after
`userEntryAuth` and `appTriggeredAuth` to run in background.
>   - When `isMultichainAccountsState2Enabled()`:
> - Calls `Engine.context.MultichainAccountService.resyncAccounts()`
with error handling.
> - Triggers multichain discovery/alignment on all HD entropy sources
via `attemptMultichainAccountWalletDiscovery`.
> - Otherwise, retries any pending Snap discovery based on
`WALLET_SNAP_MAP` storage flags.
> - **Tests** (`app/core/Authentication/Authentication.test.ts`):
> - Add assertions for account resync on login (state 2) and discovery
over HD keyrings.
> - Mocks updated to include `MultichainAccountService.resyncAccounts`.
> - **Dependencies**:
> - Bump `@metamask/solana-wallet-snap` from `^2.4.6` to `^2.4.7`
(lockfile updated).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f9a3cda. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
… header (#22834)

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

- Ensures the buy preview button display value is always the same as the
header

<!--
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:
[PRED-308](https://consensyssoftware.atlassian.net/browse/PRED-308)

## **Manual testing steps**

```gherkin
Feature: my feature name

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

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

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

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


[PRED-308]:
https://consensyssoftware.atlassian.net/browse/PRED-308?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Updates the buy preview button to display `preview.sharePrice`
(fallback to `outcomeToken.price`) so it matches the header value.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a3377ee. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Hide all standard transaction notifications for MetaMask Pay, including
any required transactions or those in the same batch.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: #22764 

## **Manual testing steps**

## **Screenshots/Recordings**

### **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
- [ ] 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]
> Extends notification skipping to include required transactions and
those in the same batch as skipped types, with tests added.
> 
> - **Core (`app/core/NotificationManager.js`)**
> - Refines `#shouldSkipNotification` to use cached `transactions` and
early returns.
>   - Skips notifications when:
> - The transaction is required by another (`tx.requiredTransactionIds`
includes `transactionMeta.id`).
>     - It shares a `batchId` with a transaction of skipped types.
> - **Tests (`app/core/NotificationsManager.test.ts`)**
> - Adds cases verifying no notifications for required and same-batch
scenarios.
>   - Minor additions (e.g., `Hex` import) to support tests.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8ddba83. 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]
> Update GitHub Action fetch step to unshallow the repo and fetch
`origin/main` to ensure a valid merge-base for PR diff analysis.
> 
> - **GitHub Action
(`.github/actions/smart-e2e-selection/action.yml`)**:
>   - Adjust base-branch fetch logic:
>     - Unshallow the repository first (`git fetch --unshallow`).
> - Fetch `origin main` (no depth constraint) to ensure `merge-base`
exists for diffs.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
be96561. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Nov 18, 2025
@pull pull Bot added the ⤵️ pull label Nov 18, 2025
@pull pull Bot merged commit 0d9d07e into Reality2byte:main Nov 18, 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.

4 participants