Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version v12.12.0 RC #30020

Draft
wants to merge 275 commits into
base: master
Choose a base branch
from
Draft

Version v12.12.0 RC #30020

wants to merge 275 commits into from

Conversation

metamaskbot
Copy link
Collaborator

📦 🚀

georgewrmarshall and others added 30 commits December 18, 2024 16:04
## **Description**

This PR improves the layout of the basic security section by aligning
the toggle button with the heading text. The changes include:

1. Restructuring the layout using Box components with proper alignment
2. Moving the toggle button to be inline with the heading
3. Improving the visual hierarchy by using proper Typography components
4. Maintaining the description text below with appropriate spacing

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29258?quickstart=1)

## **Related issues**

Fixes: #26667

## **Manual testing steps**

1. Go to Settings > Security & Privacy
2. Observe the Basic Configuration section at the top
3. Verify the toggle button is properly aligned with the heading
4. Verify the description text appears below with proper spacing

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/bab9a14c-8f10-4865-b159-5343537a2785

### **After**


https://github.com/user-attachments/assets/b9d02fd8-8e35-4dfa-a00d-b4e6952625df

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
… marketData (#29299)

## **Description**

On main asset list, if a token doesn't have marketData, we do not
display the fiat value. On tokenDetails we were falling back to zero
balance (this is incorrect)

This PR adds a fix to not fallback to zero balance, and to instead
simply omit the value.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29299?quickstart=1)

## **Related issues**

Fixes: #29244

## **Manual testing steps**

1. Add a memcoin without marketData
2. Validate that no fiat value is shown on main asset list
3. Validate that no fiat value is shown on token details (should not
display zero value)
4. Ensure nothing results in `NaN` value.

## **Screenshots/Recordings**

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

### **Before**

<img width="355" alt="Screenshot 2024-12-17 at 1 39 10 PM"
src="https://github.com/user-attachments/assets/3c561498-9ee7-403e-97ff-adf16bf6beda"
/>

<img width="358" alt="Screenshot 2024-12-17 at 1 39 26 PM"
src="https://github.com/user-attachments/assets/c19062d9-7082-46f1-b3e9-8264e9ba3749"
/>

### **After**

<img width="360" alt="Screenshot 2024-12-17 at 1 34 09 PM"
src="https://github.com/user-attachments/assets/80240d57-e875-4418-9574-81ecca7c2690"
/>

<img width="357" alt="Screenshot 2024-12-17 at 1 34 26 PM"
src="https://github.com/user-attachments/assets/852e2cab-0a8b-413b-97ea-35ad725f3add"
/>

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…action.js` (#27641)

These selectors were duplicated because our circular dependencies were
not letting us import them. Now that I've untangled a bunch of files we
can import them just fine!

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


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27641?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

### **Before**


### **After**

<!-- [screenshots/recordings] 

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
-->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

* Moving `test/e2e/tests/tokens/add-multiple-tokens.spec.js` to use POM
and TS
* Adds new generic modal PO for when we just need to click confirm or
cancel `test/e2e/page-objects/pages/dialog/dialog.ts`
* New PO for add tokens dialog
`test/e2e/page-objects/pages/dialog/add-tokens.ts`
* Minor updates to asset-list and dapp POs

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29288?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

Tests should pass, and test logic should be checked for correctness.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…#29045)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
This PR bumps `@metamask/network-controller` and
`@metamask/eth-json-rpc-middleware` by a patch version to fix an issue
related to `@metamask/eth-block-tracker`, used to listen to new blocks
emitted by networks.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29045?quickstart=1)

## **Related issues**

Fixes: #17040

## **Manual testing steps**

This only applies to views that show a single chain: since now the
wallet home shows all networks, requests will be fired regardless of the
globally selected network. To test this, the chain filter in the home
should be set to a specific chain, instead of all

1. Add a local ganache network 
2. Turn off the local ganache server
3. Observe requests failing when navigating to the home of the wallet
(while showing all networks)
4. Filter a single chain which is not the local one (e.g. mainnet)
5. Polling to localhost should stop

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
chore: Master sync following v12.9.2
## **Description**

This PR updates the MenuItem component to better align with our design
system by:
1. Implementing responsive text sizes - 14px for small screens and 16px
for large screens
2. Adjusting the padding to improve visual spacing and alignment

These changes improve consistency across the application and enhance the
overall user experience by providing better readability and spacing
across different device sizes.

1. Reason for change: MenuItem text size and padding are not following
our design system guidelines
2. Solution: Update text sizing and padding using our design system's
specifications

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29304?quickstart=1)

## **Related issues**

Fixes: #26668

## **Manual testing steps**

1. Open MetaMask extension
2. Click on any menu with MenuItems
3. Verify text is 14px on small screens (< 768px)
4. Verify text is 16px on large screens (≥ 768px)
5. Verify padding provides proper spacing around menu items
6. Verify all alignments and spacing remain consistent with icons and
subtitles

## **Screenshots/Recordings**

### **Before**

Menu item is locked to 16px font size and y:14px x:16px padding


https://github.com/user-attachments/assets/6978a281-7de2-4141-a664-117952f63195

### **After**

Menu item uses responsive typography to 14px/16px font size and y:16px
x:16px padding


https://github.com/user-attachments/assets/0dd13e70-0be2-4f85-8399-6337ce379e02

Other menus using the `MenuItem` still function as expected in both
expanded and popup views.


https://github.com/user-attachments/assets/4d3a215a-6778-452d-84e1-535bb10b9b2e



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

Adds the network name to the assets details page so the user can be sure
to know what network a given asset lives on.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29211?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-475

## **Manual testing steps**

1. Click any number of asset items in the asset list
2. Ensure that the network name that displays matches the asset network
and images

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

<img width="748" alt="SCR-20241213-osij"
src="https://github.com/user-attachments/assets/4811d56f-b856-4cef-af0f-e7ac696a4c60"
/>



## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

Adds effect checks; removes old hooks unused; and adds tests.

I really HATE the useFootguns we have everywhere for notifications. I
want us to do a wider cleanup task.

1. Remove the Provider values. We can keep the provider to run initial
effects, but other than that, we should not expose anything from it!
2. Remove nearly all of the useEffects scattered across all the
components. Instead we can utilise 1 reusable hook for fetching.
- potentially we can expose this in the provider if we really want to
fetch only once!

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29327?quickstart=1)

## **Related issues**

Fixes: #28173

## **Manual testing steps**

1. Go through onboarding, and settings pages > Notifications
2. Check console and network tab, are we making API calls and throwing
errors in console?

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
## **Description**
<!--
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?
-->
- E2E tests covering different scenarios for creating/removing Solana
accounts.
- Refactor around some snap logic for BTC/Solana 

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29054?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

Running flask tests should pass


## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

---------

Co-authored-by: Ulisses Ferreira <[email protected]>
Co-authored-by: Dan J Miller <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
<!--
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**

Sometimes, when approving a token, the spending cap displayed in the
transaction simulation component flickers for a split second. This can
also seen when editing the spending cap on the same screen.

In the approve screen, `useAssetDetails` returns `decimals` at first as
`undefined` while it's determined asynchronously. Since
`useApproveTokenSimulation` takes `decimals` as an argument, a default
of `'0'` was set to quiet the type-checker. This default is what
provokes the UI flicker.

In the example video below, the token has 4 decimals and the spending
cap is 70000 / 10 ** 4 = 7. But while decimals is still `undefined`,
`'0'` is used in `useApproveTokenSimulation` to determine the spending
cap (dividing the value by 10 to the number of decimals). This amounts
to `70000` instead of `7` for a split second, before decimals `'4'` is
returned by `useAssetDetails`.

The fix for this bug is to let the loading spinner linger a few
miliseconds longer while decimals is still `undefined`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29206?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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



https://github.com/user-attachments/assets/a09f449a-78ea-4083-b47b-2f329126d4b6



### **After**

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



https://github.com/user-attachments/assets/68142912-ae20-47f6-8dd4-2b9184b57bbf



## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…t is valid UTF-8 (#29232)

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

Converts personal sign message to UTF-8 string only if it can be
converted to valid UTF-8 string.

## **Related issues**

Fixes: #3931

## **Manual testing steps**

1. Send personal sign request to extension with message string
`0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`
2. Check on confirmation page that it is displayed as UTF-8 string

## **Screenshots/Recordings**
<img width="360" alt="Screenshot 2024-12-16 at 6 53 30 PM"
src="https://github.com/user-attachments/assets/b2053d70-dbed-4bd3-8e77-d0ba3f4150bc"
/>

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…ble (#29282)

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


Previously, if a pet name with 12 characters would be set, the
truncation would be triggered with the 12 chars plus the three ellipsis
dots. This would result in a elongated pill component that would be too
long.

To fix this, we now truncate at 12 characters, but showing 9 characters
only plus the three dots, totalling the same maximum 12 chars.

Examples:
- Very large account name (23 characters) -> Very larg... (9 + 3
characters)
- My DeFi Account (15 characters) -> My DeFi A... (9 + 3 characters)
- DeFi Account (12 characters) -> DeFi Acco... (9 + 3 characters)
- Own Account (11 characters) -> Own Account (11 characters)


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29282?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3775

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

<img width="356" alt="Screenshot 2024-12-17 at 14 50 02"
src="https://github.com/user-attachments/assets/c266b8e4-05c3-4017-912d-7cef7713f9e6"
/>
<img width="360" alt="Screenshot 2024-12-17 at 14 49 33"
src="https://github.com/user-attachments/assets/53fa1783-8ffb-4b06-a281-98c2fc396d85"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR bumps `@metamask/user-operation-controller` to `^21.0.0`

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29089?quickstart=1)

## **Related issues**

Fixes: #28986

## **Manual testing steps**

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: MetaMask Bot <[email protected]>
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR introduces tracking metrics for banners in the carousel to
monitor their effectiveness. The following events are added:

- **Banner selected:** Triggered when a banner or a button within a
banner is clicked.
- **Close all banners:** Triggered when the last banner in the carousel
is closed.
- **Banner shown:** Triggered when a banner is displayed in the
carousel.

### Tracking Implementation Details:

#### Banner selected
When a banner or button in a banner is clicked:
```javascript
trackEvent({
          event: MetaMetricsEventName.BannerSelect,
          category: MetaMetricsEventCategory.Banner,
          properties: {
            banner_name: e.g. buy, bridge, sell, card
          }
});
```

#### Close all banners
When the last banner in the carousel is closed:
```javascript
trackEvent({
          event: MetaMetricsEventName.BannerCloseAll,
          category: MetaMetricsEventCategory.Banner
});
```

#### Banner shown
When a banner is displayed in the carousel:
```javascript
trackEvent({
          event: MetaMetricsEventName.BannerDisplay,
          category: MetaMetricsEventCategory.Banner,
          properties: {
            banner_name: e.g. buy, bridge, sell, card
          }
});
```

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3764

## **Manual testing steps**

1. Open the carousel.
2. Click on banners or buttons within banners to trigger the "Banner
selected" event.
3. Close the last banner to trigger the "Close all banners" event.
4. Navigate through the carousel to ensure the "Banner shown" event is
fired for each displayed banner.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
This PR is to update the margin bottom in the detected token banner

## **Description**

This PR updates the Top right bottom and left margin to 16px, 16px, 4px
and 16px for import token banner

## **Related issues**

Fixes: #26670 

## **Manual testing steps**

1. Must be a new user with not all tokens added
2. Open MetaMask
3. If user has detected tokens, check the margin of the banner

## **Screenshots/Recordings**


### **Before**
![Screenshot 2024-12-17 at 3 06
39 PM](https://github.com/user-attachments/assets/b912aa7a-04da-4354-88bc-c37ca4433b25)


### **After**
![Screenshot 2024-12-17 at 3 38
33 PM](https://github.com/user-attachments/assets/b7d4afba-615a-4df3-8598-ef2b82d18143)


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

The GitHub Actions workflow `wait-for-circleci-workflow-status` has been
updated to ensure that it waits for the correct workflow. Previously it
always chose the most recent workflow for the given branch, but it may
have chosen a workflow corresponding to the wrong commit. It has been
updated to find one matching the same commit that triggered the GitHub
Actions workflow.

A log has been added to help diagnose any future problems with this
workflow, and to help with verification.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29310?quickstart=1)

## **Related issues**

N/A

## **Manual testing steps**

Check the logs of the "Wait for CircleCI workflow status" job, and see
that the workflow ID it's waiting on is correct when making multiple
successive commits (comparing the timing using the CircleCI dashboard)

Unfortunately the ID logged in the action is not shown on the CircleCI
UI, but you can download the pipeline data with this command: `curl
'https://circleci.com/api/v2/project/gh/MetaMask/metamask-extension/pipeline?branch=[branch]'
> pipeline.json` and look through the `pipeline.json` file for an entry
that matches the logged ID. The `number` field is the pipeline number,
which is in the CircleCI workflow URL (e.g.
`https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/[pipeline
number]/workflows/[some other number]`)

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…9344)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR bumps `@metamask/smart-transactions-controller` to `16.0.0`
[CHANGELOG](https://github.com/MetaMask/smart-transactions-controller/blob/main/CHANGELOG.md#1600)
- `@metamask/transaction-controller` has been bumped to `42.0.0` which
match the current version used in the client.

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29344?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Solana snap bump
https://github.com/MetaMask/snap-solana-wallet/releases/tag/v1.0.4

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29350?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: Antonio Regadas <[email protected]>
Co-authored-by: Javier <[email protected]>
)

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

Uses `UNLIMITED_THRESHOLD` to determine wether or not to show a permit
amount as "Unlimited". Updates unit tests.

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29102?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3763

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…ons (#29353)

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

We were inadvertently referencing the network icon map instead of the
native token map.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29353?quickstart=1)

## **Related issues**

Fixes: #29351

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Adds Origin Pill component and references it on the confirmation
template.
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29317?quickstart=1)

## **Related issues**

Fixes: #26656

## **Manual testing steps**

1. Go to the test dApp
2. Add a custom chain

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

<img width="472" alt="Screenshot 2024-12-18 at 12 08 31"
src="https://github.com/user-attachments/assets/dea99351-e962-4b4c-b465-e2be281705ba"
/>
<img width="472" alt="Screenshot 2024-12-18 at 11 58 38"
src="https://github.com/user-attachments/assets/e8da3a78-9ca4-4d3a-b68e-b5aafbe2532e"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to prevent unwanted `updateEditableParams` calls in send
flow when `useMaxValue` is settled.

After investigating [Sentry error mentioned in the
task](https://metamask.sentry.io/issues/5973118037/events/1ee3e017ad454f09b3666089fba3c2bd/?project=273505&referrer=previous-event)
noticed `updateEditableParams` is throwing when `useMaxValue` is set to
`true`. This issue is happening when we submit/cancel confirmation,
component gets an update, `updateMaxValue - updateEditableParams` gets
called but transaction is not `unapproved` state. So adding a condition
to updating transaction value only when transaction is `unapproved`
status, this will guarantee to prevent unwanted calls.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29048?quickstart=1)

## **Related issues**

Fixes:
#27742

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

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

### **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
There is a lint rule that flags lines in which controllers and ui
components import types/variables/methods from restricted directories.
This change moves the imported elements to the `shared` directory to
satisfy the linter. Also uses `import type` to remove type definitions
from runtime bundles when possible


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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29254?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1829

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

N/A

### **After**

N/A - no functional changes

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Changes the Low Return tooltip into an alert Banner, and highlights
network fee in the quote card

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29171?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1814

## **Manual testing steps**

1. Request quotes with a low return
2. Verify that new treatment is shown

## **Screenshots/Recordings**

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

### **Before**

![Screenshot 2024-12-17 at 10 47
21 AM](https://github.com/user-attachments/assets/c30a4682-7174-4041-83df-58726127f3c5)
![Screenshot 2024-12-17 at 10 47
46 AM](https://github.com/user-attachments/assets/f4576048-7f41-4677-b205-710421ecd9c6)


### **After**

![Screenshot 2024-12-17 at 10 32
28 AM](https://github.com/user-attachments/assets/c8db2d88-fce9-491e-9949-271b3d9faf96)


## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

localized string `loadingTokens` is no longer being used. This PR
removes it.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29329?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

Fixes an issue where erc20 token balances were incorrectly showing 0. On
the repro we have, we noticed a token in state with address
`0x0000000000000000000000000000000000000000` on mainnet, which is not a
valid erc20 token. This caused the multicall to revert, preventing other
balances from updating.

There's a fix in the controller here:
MetaMask/core#5083 which will fall back to
parallel `balanceOf` calls if the multicall reverts.

And we're also doing a migration here to remove zero address tokens on
mainnet.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29361?quickstart=1)

## **Related issues**

## **Manual testing steps**

The current version of the wallet should not allow importing an invalid
erc20 address through any mechanism, so not easy to reproduce naturally.

The migration can be tested by checking out an older version like `git
checkout v12.9.0 `, upgrading to this branch, verifying the migration
ran in background logs, and that your tokens remain.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…29359)

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

Removes the duplicated tests for redesigned signature metrics, the same
metrics are checked in the tests in the folder :
test/e2e/tests/confirmations/signatures

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29359?quickstart=1)

## **Related issues**

Fixes:
[29228](#29228)

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…29343)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to filter request params before calling security API call
if method is `signTypedDatav3v4`

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29343?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3830

## **Manual testing steps**

1. Copy the following payload 

```
// Request the current account addresses from the Ethereum provider
const addresses = await window.ethereum.request({ "method": "eth_accounts" });

// Construct the JSON string for eth_signTypedData_v4, including the dynamic owner address
const jsonData = {
  domain: {
    name: "USD Coin",
    version: "2",
    chainId: "1",
    verifyingContract: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
  },
  types: {
    EIP712Domain: [
      { name: "name", type: "string" },
      { name: "version", type: "string" },
      { name: "chainId", type: "uint256" },
      { name: "verifyingContract", type: "address" }
    ],
    Permit: [
      { name: "owner", type: "address" },
      { name: "spender", type: "address" },
      { name: "value", type: "uint256" },
      { name: "nonce", type: "uint256" },
      { name: "deadline", type: "uint256" }
    ]
  },
  primaryType: "Permit",
  message: {
    owner: addresses[0],
    spender: "0xa2d86c5ff6fbf5f455b1ba2737938776c24d7a58",
    value: "115792089237316195423570985008687907853269984665640564039457584007913129639935",
    nonce: "0",
    deadline: "115792089237316195423570985008687907853269984665640564039457584007913129639935"
  }
};

// Use the first account address for signing the typed data
window.ethereum.sendAsync({
  method: "eth_signTypedData_v4",
  params: [
    addresses[0],
    JSON.stringify(jsonData),
    {},
    {},
    {}
  ]
});
```
2. Navigate to MM E2E Test Dapp > Connect Wallet > Open up the console >
Paste the payload above > Hit enter
3. Notice that the transaction is considered as malicious (which was not
flagged before)

## **Screenshots/Recordings**

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



https://github.com/user-attachments/assets/ffcdd83f-bb79-4490-b729-f96559ce5769



### **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
infiniteflower and others added 27 commits January 28, 2025 16:14
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29291?quickstart=1)

This PR adds the following metrics for Bridge

1. Action Completed
2. Action Failed (source chain)
3. Action Failed (destination chain)
4. Action Failed (bridge approval failure)
5. Action Failed (allowance reset failure)

## **Related issues**

Related to Consensys/segment-schema#234

## **Manual testing steps**

Set these in `.metamaskrc`

```
SEGMENT_HOST='http://localhost:9090'
SEGMENT_WRITE_KEY=anyvalue
```

1. Open background console > Network
6. Execute a bridge tx
7. Look for `batch` network calls. The events should be the payloads.

## **Screenshots/Recordings**

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

n/a

### **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] 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
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR is to enhance Snap home page

- Migrated the Snap home page to POM

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29765?quickstart=1)

## **Related issues**

Fixes: #29895

## **Manual testing steps**

Below command for execution against chrome browser
yarn build:test:flask
yarn test:e2e:single test/e2e/snaps/test-snap-homepage.spec.ts
--browser=chrome
Below command for execution against firefox browser
yarn build:test:flask:mv2
ENABLE_MV3=false yarn test:e2e:single
test/e2e/snaps/test-snap-homepage.spec.ts --browser=firefox

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: Hassan Malik <[email protected]>
…hed (#29933)

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29933?quickstart=1)

This PR reapplies the fixes from #29411.

This PR fixes an issue where the "You Received" row in the Activity item
for a bridge tx would be partially filled in. Now we just hide it until
the bridge tx completes and we have all the necessary data to display
the row properly.

## **Related issues**

Reapplies the fixes from #29411

## **Manual testing steps**

1. Start a bridge tx
1. Get navigated to Activity list
1. Click on bridge tx
1. Observe that "You received" is not present until the bridge is
completed.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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



https://github.com/user-attachments/assets/8536e6c7-34c1-49a3-a692-7e7acbcf5994



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] 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
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/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.
For certain RPCs, an explicit data value is required even if the data is
meant to be empty. This PR adds that explicit "0x" value in the case
data is empty to resolve any RPC errors.


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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29946?quickstart=1)

## **Related issues**

Fixes: #29923

## **Manual testing steps**

1. Select zksync or sepolia zksync
2. Go to send page
3. See working "continue" button

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29929?quickstart=1)

This PR migrates the storybook jobs from CircleCI to GitHub Actions.

## **Related issues**

Fixes: #29447

## **Manual testing steps**

1. Everything should work the same as before

## **Screenshots/Recordings**

Not applicable

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

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

The issue occurred because switching networks from the RPC selector,
which is only available when there's a network with at least 2 RPCs, was
not performing the same actions as switching networks from clicking the
network list item directly.

I have created a handler for the actions that need to be performed and
passed it down to both the network list item and the rpc selector modal,
that way it ensures that the same actions occur.

A test has been added to the rpc modal to validate the new handler is
being called. Tests already exist in the network list to validate that
those actions are taking place, and they are still passing.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29943?quickstart=1)

## **Related issues**

Fixes: #29260

## **Manual testing steps**

1. Ensure at least one of your networks has more than one RPC, so that
the RPC selector appears.
2. Set any network and, in the Tokens tab, select "Current network" as
the option.
3. Open the network selector and select another network by clicking in
the rpc url, which will open an rpc selector modal.
4. Select any of the RPCs and check that the tokens from the new network
appear and that "Current network" is still

## **Screenshots/Recordings**

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

### **Before**

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


https://github.com/user-attachments/assets/3ac163d3-4f2e-4170-81f4-f3b4ccc8e3d3



### **After**

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


https://github.com/user-attachments/assets/7dc02f85-42e0-449e-a419-cc74fc936de7



## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

As part of the MMI deprecation and code removal, it's necessary to
remove the fenced UI code before the background code, since the UI code
is lower in the dependency chain.

This PR removes any code that's inside a @build-mmi code fence. In order
to satisfy various requirements this also means removing unused imports,
which the PR also deletes.

The PR also removes tests (which have never been code fenced) because in
many cases they are caused by fenced code.

In addition, any non-fenced code which is known to be MMI specific is
removed.

It does not remove inverse MMI code fences, i.e. fences which are there
to stop things running in MMI and are now redundant. This is for the
sake of keeping the PR a bit smaller. Those will be removed in the next
PR.

## **Related issues**

Fixes: #29782 

## **Manual testing steps**

Not applicable, as no new feature is added. However, many/most UI
features are touched.

## **Screenshots/Recordings**


### **Before**


![image](https://github.com/user-attachments/assets/bf1c228f-1b4b-400e-aefa-87fb527cee71)


### **After**


![image](https://github.com/user-attachments/assets/8d2d1ea5-1e3b-4a32-b870-187270c8f53e)

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…ts?` (#29986)

## **Description**
Solana spec failed due to a new host request. After investigating in
slack we saw that there's an initial request to
`https://api.simplehash.com/api/v0/fungibles/assets?fungible_ids=solana.2RBko3xoz56aH69isQMUpzZd9NYHahhwC23A5F3Spkin`
which is going to a live server. This returns a json response with an
image URL, which is subsequently called and makes the spec failed with a
new host
`https://lh3.googleusercontent.com/sAmhY2ysWhEtT0c5Wq2oXNEWe0Z0j7MQ99cCt6e1qxTnx3azLSofskaaKHz8IQFoEQ_8XpXnln-lbId-Aqm5T3oJxd8PB7gWJ8o=s250`

So mocking the first request fixes the issue as we prevent the second
one to happen (and the 1st one to go into a live server).


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




[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29986?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**


[solana-mock-fix.webm](https://github.com/user-attachments/assets/a21abede-997b-4b32-8829-4ae5dc408c81)
## **Description**

There was a bug in our script that determines the next semver version.
It was taking the highest release version and incrementing the minor
version number to deduce the next semver version number to apply on PRs
when they get merged, which works in most cases, but not when the
highest version number is a patch version. By incrementing the minor
version number of a patch version, we end up with a new patch version
number, which doesn't even exist by the way. This is not expected as the
next semver version shall never be a patch version.

For example: all these PRs have been incorrectly labeled (release
12.11.1 doesn't even exist):
https://github.com/MetaMask/metamask-extension/issues?q=label%3Arelease-12.11.1+is%3Aclosed

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29951?quickstart=1)

[Same PR for Mobile
repo](MetaMask/metamask-mobile#13232)

## **Related issues**

- None

## **Manual testing steps**

I tested it on this [test
repo](https://github.com/gauthierpetetin-test/repo_test/branches/all?query=release%2F),
where the current highest version number is 12.12.166
- I merged this
[PR](gauthierpetetin-test/repo_test#217) before
fixing the bug, and it got labeled with `release-12.13.166`
- I merged this
[PR](gauthierpetetin-test/repo_test#218) after
fixing the bug, and it got labeled with `release-12.13.0`

## **Screenshots/Recordings**

- None

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
For part of our collaboration with the Snaps team to enable Non EVM
multichain API we are refactoring the connection flow UI.

The first step to enable this to modify what [the connection
confirmation UI
components](https://github.com/MetaMask/metamask-extension/blob/cdd603c56211d1d483d87e5ee3fea27aadd66fda/ui/pages/permissions-connect/connect-page/connect-page.tsx#L59)
receive from the ApprovalController.
Currently they receive an object like this:
```json
{
    "eth_accounts": {
        "caveats": [
            {
                "type": "restrictReturnedAccounts",
                "value": []
            }
        ]
    },
    "endowment:permitted-chains": {
        "caveats": [
            {
                "type": "restrictNetworkSwitching",
                "value": []
            }
        ]
    }
}
```

Basically the params for a `wallet_requestPermission` request.

We want to change this so that instead they receive (and know how to
interpret) a CAIP25 formatted request like:

```json
{
    "eip155:1": {
        "accounts": []  // there may be accounts here but often will not be
    },
    "eip155:10": {
        "accounts": []
    },
}
```

<!--
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?
- For part of our collaboration with the Snaps team to enable Non EVM
multichain API we are refactoring the connection flow UI.

2. What is the improvement/solution?
- We want to change UI to receive (and know how to interpret) a CAIP25
formatted request like:
```
{
    "eip155:1": {
        "accounts": []  // there may be accounts here but often will not be
    },
    "eip155:10": {
        "accounts": []
    },
}
```
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29824?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Send the following request
```
await window.ethereum.request({
 "method": "wallet_requestPermissions",
 "params": [
  {
    
    "eth_accounts": {
        "caveats": [
            {
                "type": "restrictReturnedAccounts",
                "value": []
            }
        ]
    },
    "endowment:permitted-chains": {
        "caveats": [
            {
                "type": "restrictNetworkSwitching",
                "value": []
            }
        ]
    }
  }
],
});


```
2. Wallet extension UI should prompt user to give permissions to
accounts / chains and edit if desired or confirm to proceed.

## **Screenshots/Recordings**



https://github.com/user-attachments/assets/a877e2ad-3800-47c2-a577-4f1c76d546be

NOTE: Don't mind different screens in the UI, this vid is outdated and
all UI screens are same as `main` branch

### **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

---------

Co-authored-by: Alex Donesky <[email protected]>
## **Description**

Our e2e test tooling takes a DOM snapshot on test failure to help with
debugging. Unfortunately this is not overly useful right now because the
driver is always set to the last window handle when this snapshot is
taken, which is typically the offscreen document (at least on Chrome).
Even on Firefox where there is no offscreen document, it may end up
taking a snapshot of the wrong page when there are multiple open.

The DOM snapshot step has been updated to take snapshots of all open
pages, rather than just the "current" one.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29983?quickstart=1)

## **Related issues**

N/A

## **Manual testing steps**

See the DOM snapshot artifacts in CircleCI upon failure

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to fix send max value issue for redesigned confirmations.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29960?quickstart=1)

## **Related issues**

Fixes: #29903

## **Manual testing steps**

1. Initiate a native send flow from wallet
2. Click max in the amount picker
3. Go to next step (confirmation)
4. See that value changes when gas is changed

## **Screenshots/Recordings**

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



https://github.com/user-attachments/assets/14a85e29-b7d5-4bfe-b013-25f1954103cc



### **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: Harika <[email protected]>
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29984?quickstart=1)

Fixes a bug in the deployment step of the newly introduced
build-storybook workflow.

## **Related issues**

Fixes: https://consensys.slack.com/archives/CTQAGKY5V/p1738162973016659

## **Manual testing steps**

1. Remove the branch filter for testing, and see the changes in
https://github.com/MetaMask/metamask-storybook

## **Screenshots/Recordings**

Not applicable

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Fixes a formatting issue when displaying mailto links in the
`SnapLinkWarning`. This was broken due to parsing the `mailto:` link in
the same way as HTTPS and assumptions made about the output of that
parsing.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30000?quickstart=1)

## **Related issues**

Fixes: #29977

## **Manual testing steps**

See the attached ticket

## **Screenshots/Recordings**

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

### **Before**

See the attached ticket

### **After**


![image](https://github.com/user-attachments/assets/03dcf5d2-2d38-438f-b575-85c197f26961)
## **Description**

Only remaining QA issue for feature: [[EXT] STX Banner Alert & STX x
Default
Migration](#28854)

Update migration to treat null preference value as an existing enabled
state, preventing unneeded banner display for v12.6.0-12.7.2 migrations.

The update removes the `null` check in the migration's `transformState`
function (near line 46 of `135.ts`)

```ts
  if (
    currentOptInStatus === undefined ||
    currentOptInStatus === null ||  // remove this line
    (currentOptInStatus === false && !hasExistingSmartTransactions(state))
  ) {
  ```

And let the condition fall through to the else block. This will ensure that `smartTransactionsMigrationApplied: false` and ensure that we don't see a banner on Transaction Confirmation.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29968?quickstart=1)

## **Related issues**

Fixes: #29970  

**Description**
Migration fails when the origin extension is version 12.7.x (tested 1 and 2)
In this cases, the alert banner is displayed in the confirmation screen (e.g: send and swaps) when the parameter STX in settings was enabled in the older extension.

**Expected behavior**
The behaviour should be:
extension 12.11.0 < with STX activated -> update to 12.11.0 and no banner is displayed in the confirmation screen

## **Manual testing steps for fix**

1. Migrate from any version 12.6.* to 12.7.* to 12.10.1 (or 12.11.0 depending) 
2. Ensure that STX is ON in the old version (before migrating to the newer version)
3. After migration try to Swap or Send on Ethereum Mainnet  & Sepolia and ensure there is no STX Banner Alert shown

## **Screenshots/Recordings**

For users with STX ON before and after Migration:

### **Before**

<img width="150" alt="after-fix" src="https://github.com/user-attachments/assets/fe33da33-7828-45e2-b7a1-8b7d60b12de5" />

### **After**

<img width="150" alt="after-fix" src="https://github.com/user-attachments/assets/fe33da33-7828-45e2-b7a1-8b7d60b12de5" />

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR addresses an issue where the "Insufficient funds" alert
incorrectly displayed "ETH" as the native token, regardless of the
actual network's native token
#28867. This was
observed when users attempted to initiate a transaction on networks with
a different native token, such as Polygon, where "POL" should be
displayed instead of "ETH".

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29828?quickstart=1)

## **Related issues**

#28867

## **Manual testing steps**

1. Select Polygon
2. Trigger a dapp tx with an account without funds (you can use these
tests https://metamask.github.io/test-dapp/)
3. Click on the Alert
4. See POL as the token name

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

https://www.loom.com/share/8dd8001fc8d44da3b77e52a4877427f8

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
## **Description**

This PR moves the notifications logic from `useProfileSyncing` to the
Notifications context.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30004?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/IDENTITY-14

## **Manual testing steps**

1. Enable notifications
2. Disable profile syncing
3. Verify that the notifications counter has been updated

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR updates the outline style when the user navigates menu items
using the TAB key. This ensures the user can clearly identify which item
is currently focused.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29753?quickstart=1)

## **Related issues**

#26728

## **Manual testing steps**

1. Open the menu
2. Navigate through the items using the TAB key
3. Verify that the outline is displayed correctly on the focused item

## **Screenshots/Recordings**

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

### **Before**

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

### **After**


https://www.loom.com/share/25a3748a1a8b49e6b3cf617ccf791240?sid=cbe7a8d6-46d9-431a-a0dd-682c6cf209a2

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…up mitigation (#29745)

<!--
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 replaces
#24016

This PR does the following:

Refactors `local-store.js` and `network-store.js` to `ExtensionStore.ts`
and `ReadOnlyNetworkStore.ts`. These two classes are extensions of the
new `BaseStore` class.

The new `BaseStore` class: "is an abstract class designed to be extended
by other classes that implement the abstract methods `set` and `get`.
This class provides the foundation for different storage
implementations, enabling them to adhere to a consistent interface for
retrieving and setting application state." In future PRs, new classes
that use the indexeddb api, and the localStorage api in the offscreen
document, will be added that also extend the BaseStore class.

The BaseStore class has a simple interface with just a `get` and `set`
method. Accordingly, `ExtensionSotre` and `ReadOnlyNetworkStore` are
significantly simplified compared to their predecessors. The
functionality for managing data (e.g. handling error states, handling
metadata, etc) that used to be in `local-store.js` and
`network-store.js` is now in a new `PersistanceManager` class.

The new `PersistanceManager` class: "The PersistanceManager class serves
as a high-level manager for handling storage-related operations using a
local storage system. It provides methods to read and write state,
manage metadata, and handle errors or corruption in the underlying
storage system."

This is a step towards providing a fail safe for state corruption. The
new classes will be utilized for this additional functionality.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29745?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

No functional changes should have occurred. Manual regression cases to
test include:

- make some changes such as a adding a network or changing settings.
Close the browser. Re-open the browser and open metamask. The data
should be unchanged.
- Install an old version. Make some changes. Upgrade to the build
generated from this branch. Verify that the state of the wallet, and its
data, is as expected.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: Brad Decker <[email protected]>
Co-authored-by: Mark Stacey <[email protected]>
## **Description**

This PR ensures that the sign-in process happen only at the "pin
extension" screen during onboarding.
It was previously also called at the "creation successful" screen, but
this is not needed since onboarding always ends with the "pin extension"
screen.

It also removes the `useCreateSession` hook, as this is not needed
anymore since we directly call `performSignIn` from the background.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30003?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/IDENTITY-9

## **Manual testing steps**

1. Do a fresh install
2. Open your network tab and filter with "login"
3. Do an onboarding and verify that this is called only once

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
## **Description**

This PR updates the style of the
`ui/components/ui/tabs/tabs.component.js` component and removes some
custom classes used to override the style in various parts of the site
(particularly on the home page and the notifications page). This ensures
a consistent style for the tabs.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29652?quickstart=1)

## **Related issues**

Original request:
#26190

## **Manual testing steps**

The tabs tested are those indicated in this issue:
#28910. However,
some of them seem to no longer be in use (for example, the “snap” tab in
the permissions page should no longer exist, as it now has its own
dedicated page).

## **Screenshots/Recordings**

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

### **Before**

### **After**

<img width="453" alt="Screenshot 2025-01-13 at 09 49 49"
src="https://github.com/user-attachments/assets/55aeaf12-fa5e-4c8c-8f4b-4ab9bfab29ff"
/>
<img width="366" alt="Screenshot 2025-01-12 at 23 28 37"
src="https://github.com/user-attachments/assets/935de0dc-e0dd-4439-8ec0-754ded9a256b"
/>
<img width="358" alt="Screenshot 2025-01-12 at 23 28 23"
src="https://github.com/user-attachments/assets/fa1cb8b8-97f4-483b-aedc-afdc91d9fb33"
/>
<img width="361" alt="Screenshot 2025-01-12 at 23 28 08"
src="https://github.com/user-attachments/assets/8d9b2414-57f9-48ba-99ec-80e48efe1379"
/>

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
## **Description**

Bump notifications controller from `0.16.0` to `0.17.0`


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29921?quickstart=1)

## **Related issues**

Fixes: Audit resolution added here -
#29914

## **Manual testing steps**

1. Check `yarn audit` to see if `undici` audit issues are resolved.
2. Notification devs - check push notifications are still working as
expected.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

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

This PR introduces significant improvements to the handling of alt text
for NFT images within the application. The main changes include:

**Removal of Unnecessary Conditions for Alt Text**
In the `NftDetails`, `NftFullImage`, and `NFTSendHeading` components,
the alt text for NFT images has been simplified by removing conditions
that returned an empty string when the image was missing. Now, the alt
text is always generated using getNftImageAlt.

**Introduction of a Truncation Function for Alt Text**
The `nftTruncateAltText` function has been added to ensure that the alt
text does not exceed a predefined maximum length, improving
accessibility and usability.

**Updates to Tests**
- New tests have been added to cover use cases for the
`nftTruncateAltText` function
- Tests for `getNftImageAlt` have been updated to handle cases where
name, tokenId, or description are not provided

**Updates to Component Stories**
- The `NftItem` stories have been updated to use `getNftImageAlt`
- A new story `NoImageStory` has been added to test behavior when the
image is not present

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29744?quickstart=1)

## **Related issues**

Fixes: #26461

## **Manual testing steps**

Follow the steps outlined in the issue
#26461

## **Screenshots/Recordings**

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

### **Before**

### **After**

<img width="671" alt="Screenshot 2025-01-16 at 10 41 42"
src="https://github.com/user-attachments/assets/3dc6f031-6def-4ce9-8bd6-e27017291c87"
/>

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Users are experiencing issues with receiving significantly lower amounts
of destination tokens than expected during swaps. This is due to
excessive price differentials between the estimated swap amount and the
actual return. Currently, the logic for triggering a low return warning
differs between swaps and bridges, leading to inconsistencies and user
confusion.

This PR brings swap to parity with bridge by adding a warning when a
swap results in a return below 80% of the value of the source tokens.
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29918?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to swaps
2. Select tokens and input amount to force warning (eg. 0.01 ETH to ENA)
3. See warning

## **Screenshots/Recordings**

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

### **Before**
![Screenshot 2025-01-27 at 19 55
48](https://github.com/user-attachments/assets/828a13ac-10bc-4624-b538-ca1e05e36fff)

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

### **After**
![Screenshot 2025-01-27 at 19 55
18](https://github.com/user-attachments/assets/5109052f-25c0-4e32-bc4a-4ab5a7e9d526)

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

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
…29988)

## **Description**

Fix bug when requested accounts/chainIds do not match wallet state

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29988?quickstart=1)

## **Manual testing steps**
See videos below:
```
await window.ethereum.request({
 "method": "wallet_requestPermissions",
 "params": [
  {
    
    "eth_accounts": {
        "caveats": [
            {
                "type": "restrictReturnedAccounts",
                "value": []
            }
        ]
    },
    "endowment:permitted-chains": {
        "caveats": [
            {
                "type": "restrictNetworkSwitching",
                "value": ['0xbf04'] // any chainId not in the wallet
            }
        ]
    }
  }
],
});
```

```
await window.ethereum.request({
 "method": "wallet_requestPermissions",
 "params": [
  {
    
    "eth_accounts": {
        "caveats": [
            {
                "type": "restrictReturnedAccounts",
                "value": ["0x549f7D54F0a7ef67707c55dc51123586a2c6654e"] // any address not in the wallet
            }
        ]
    },
    "endowment:permitted-chains": {
        "caveats": [
            {
                "type": "restrictNetworkSwitching",
                "value": []
            }
        ]
    }
  }
],
});
```

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/21f40a75-0513-4105-8f8a-f87faf2a583c


https://github.com/user-attachments/assets/d8e71869-5181-4751-a274-8e39cc8ec567


### **After**


https://github.com/user-attachments/assets/4f33ca41-657b-4902-b998-70c8c222484a


https://github.com/user-attachments/assets/d8059e25-2772-4aef-8d26-e6b6325788ac


https://github.com/user-attachments/assets/a67517c7-498f-485a-a547-59d330d9f0a8


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.

---------

Co-authored-by: ffmcgee <[email protected]>
Co-authored-by: ffmcgee <[email protected]>
Co-authored-by: ffmcgee <[email protected]>
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

…30025)

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/PR?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
@danjm
Copy link
Contributor

danjm commented Jan 31, 2025

Builds ready [4fe3479]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.