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.6.0 #27996

Merged
merged 237 commits into from
Nov 1, 2024
Merged

Version v12.6.0 #27996

merged 237 commits into from
Nov 1, 2024

Conversation

hjetpoluru
Copy link
Contributor

@hjetpoluru hjetpoluru commented Oct 21, 2024

Description

Version v12.6.0

Open in GitHub Codespaces

pedronfigueiredo and others added 30 commits September 26, 2024 09:29
<!--
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**

Includes e2e test.

<!--
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/26906?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3004

## **Manual testing steps**

1. Go to
https://etherscan.io/token/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599#writeContract
2. Connect your wallet
3. Go to approve
4. Input an address under spender
5. Input 0 under value
6. Click write
7. Notice MM confirmation


## **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="472" alt="Screenshot 2024-09-04 at 17 00 32"
src="https://github.com/user-attachments/assets/6520ca14-068b-4fff-a4e3-7783c5fac60b">

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

---------

Co-authored-by: Priya Narayanaswamy <[email protected]>
## **Description**

This PR simplifies account syncing event names

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

## **Related issues**

Fixes:
[NOTIFY-1166](https://consensyssoftware.atlassian.net/browse/NOTIFY-1166)

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


[NOTIFY-1166]:
https://consensyssoftware.atlassian.net/browse/NOTIFY-1166?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
…7205)

<!--
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 aims to apply fixes and improvements to the Alert System in
general and specific alerts such as SIWE and contract interaction.


**Fixes:**

1- Display a more generic and toned-down message on the friction modal.

2- Show alerts before the Confirm Alert Modal (final friction modal)
when there is a danger alert.

3- Fixed CTA button when the alert has not been acknowledged.


**Fixes from UX QA feedback**

[Figma](https://www.figma.com/design/gcwF9smHsgvFWQK83lT5UU/Confirmation-redesign-V4?node-id=3293-2791&t=fX0ohLSzAelDEDvM-1)
- Change the Danger icon to `security-search` icon when button is
`Review Alerts` or `Review Alert` - ✔️
- Remove blockaid dedicated alert modal - ✔️
- Remove the “tooltip icon” whenever an alert is present -
✔️
- Always display a critical alert first when a critical alert is
present:
  - Inline alerts - ✔️
  - Multiple Alert Modal - ✔️
- Disable the CTA "Review Alerts" whenever a blocking alert is present -
✔️
- Add "Got it" for blocking alerts. (this button will be responsible for
closing the modal) - ✔️
- Remove the close `X` button - ✔️


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

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

## **Related issues**

Fixes: #27132
#27147
#27118

## **Manual testing steps**

**Case 1**

1. Go to test dapp
2. Don't have funds
3. Trigger malicious mint erc20 on Sepolia
4. Click on Review alerts

**Case 2**
1. Go to test dapp
2. Trigger malicious contract interaction on Ethereum
3. Click on Review alerts

**Case 3**
1. Go to test dapp
2. Click on Sign In With Ethereum - Bad Domain
3. Click Confirm

**Case 4**
1. Deploy an ERC721 contract from the test dapp
2. Trigger a transaction with a nonce +1, so it's not confirmed
3. Now trigger a Mint
4. Click on the alerts (there are 2)
5. Navigate to the 2nd alert
6. Click got it --> MM broke

## **Screenshots/Recordings**

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



![image](https://github.com/user-attachments/assets/213ad2ed-2556-443e-905b-17b92ac08b56)


[alert-fix.webm](https://github.com/user-attachments/assets/f8d42db8-cc7d-448b-ad8f-20a789829122)


[mint-without-funds.webm](https://github.com/user-attachments/assets/5e913290-79af-4432-b30a-b3a09891fba9)

[Contract Interaction and
Alerts.webm](https://github.com/user-attachments/assets/929a79da-eefc-44d8-b350-a165ff92300f)


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

When no token detail decimals are found in the DataTree showing an
amount, we should use the verifiedContract token details passed from
TypedSignInfo component. This PR applies this and adds an "Incomplete
Asset Displayed" when getTokenStandardAndDetails fails to return details
of a token.

also adds support for passing null decimals to fetchErc20Decimals

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

## **Related issues**

Fixes: #27243

## **Manual testing steps**

1. Go to test-dapp
2. Test Permit

## **Screenshots/Recordings**

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

### **Before**

<img width="320"
src="https://github.com/user-attachments/assets/b31f0964-9602-4284-bcf0-3fe1a49c7703">

### **After**

<img width="320"
src="https://github.com/user-attachments/assets/c07eef49-ee77-4bb6-9da4-0dd45177f7ca">


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

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

- Adds `Signature` traces
- Wraps `newUnsignedTypedMessage` in a utility function, adds end of
`Middleware` trace and `Signature` trace after hash is returned from
background.

Note that this PR still using a preview will be updated once core is
released.

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

## **Related issues**

Fixes: MetaMask/MetaMask-planning#2902

## **Manual testing steps**

No QA needed.

## **Screenshots/Recordings**

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

An example Sentry trace for `Signature`
https://metamask.sentry.io/performance/trace/53446691f4d44d40a5f9de82f1cebd05/?fov=0%2C4381.00004196167&node=txn-d4053774d6c2495b8564fdce1fac8bec&pageEnd&pageStart&project=273496&source=traces&statsPeriod=15m&timestamp=1725629491.052


### **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/develop/.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/develop/.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: Vinicius Stevam <[email protected]>
#26985)

… that opt-in


<!--
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 makes these redesigned screens available for users that opt into
redesigned transaction screens in the experimental settings page.

<!--
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/26985?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3246

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

<!--
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 removes the duplication introduced in
https://github.com/MetaMask/metamask-extension/pull/26967/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R354-R355

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

## **Related issues**

Fixes: `develop` branch 

## **Manual testing steps**

N/A

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

This PR bumps `@metamask/profile-sync-controller` to `v0.9.3`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27415?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**

- [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/develop/.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/develop/.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: MetaMask Bot <[email protected]>
Co-authored-by: Ariella Vu <[email protected]>
This PR is to add editing flow while switching networks via dapp
This PR also includes the connections flow which includes editing


## **Related issues**

Fixes: 
1. MetaMask/MetaMask-planning#2683
2. MetaMask/MetaMask-planning#2684
3. MetaMask/MetaMask-planning#2697
4. MetaMask/MetaMask-planning#2698
5. MetaMask/MetaMask-planning#2663

## **Manual testing steps**

1. run the extension with CHAIN_PERMISSIONS flag
2. Connect to a dapp 
3. Switch network via metamask
6. toast should show up
7. Then click on edit permissions, it should route to new permissions
screen
8. We have edit networks and edit accounts modal there

## **Screenshots/Recordings**


### **Before**

NA
### **After**



https://github.com/user-attachments/assets/a9dbaecf-c96b-485c-b639-f50cbe30317c


https://github.com/user-attachments/assets/8638bb1f-3739-4a2b-84ae-dca24f8abe6d



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

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Jiexi Luan <[email protected]>
Fixes this Warning introduced in #26426:

```
ramps-card.js:150 Warning: Invalid argument supplied to oneOfType. Expected an array of check functions, but received undefined at index 1.
```
#27401)

… that opt in


<!--
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 makes both redesigned screens available for users that opt into
redesigned transaction screens in the experimental settings page.

<!--
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/27401?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/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**

As part of #26986, the wrapper component for "Speed" [was changed from
ConfirmInfoRow to
ConfirmInfoAlertRow](https://github.com/MetaMask/metamask-extension/pull/26986/files#diff-dca84a26976b31828773277690e34b17f2120e4b8f821b2900f28b4f3c452c98R85).
This change means that the `ConfirmInfoRowVariant.Default` applied to
this component changes the color to blue.

To revert that aesthetic change, this PR removes said variant.

<!--
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/27416?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] -->

<img width="472" alt="Screenshot 2024-09-26 at 10 57 44"
src="https://github.com/user-attachments/assets/fa30a9a2-2e4f-40e9-9aca-2484a8c0b611">


### **After**

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

<img width="472" alt="Screenshot 2024-09-26 at 10 56 03"
src="https://github.com/user-attachments/assets/0d5ab222-fa44-4f4b-ad4e-f8a18fd0571a">


## **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.
…should queue send tx after switch network confirmation and transaction should target the correct network after switch is confirmed` (#27352)

<!--
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 race condition with window management that makes this test
fail quite often. The test performs these actions and there are
different behaviors happening, depending on the build:

1. Action: trigger a network switch -> this opens a new dialog window
(we have 4)
2. Action: trigger a send -> we are still with the network switch window
open
3. Action: we click switch network -> this closes the dialog (now we
have 3 windows for a brief moment - if this is fast, like in webpack, it
fails with the error `Error: waitUntilXWindowHandles timed out polling
window handles. Expected: 3, Actual: 4`)
4. A new dialog is open automatically -> now we have 4 windows again,
but the dialog handle ids are different
5. Sometimes this dialog is closed and then a new one is open
6. We switch to the dialog, but often the context is invalidated as we
are switching to either 1 or 4 or 5

Extra Notes:
This PR fixes the flakiness of waiting for 3 windows by adding a delay.
This won't fix the root cause of the 2 new identified issues, but after
re-runs has proven to stabilize the test

- In Webpack, sometimes the dialog for the transaction never appears,
and the wallet get's in a frozen state. The issue is on the wallet
level, see #27414
- see issue #27360
Since there is only a brief moment for having 3 windows, waiting for 3
windows and then proceeding also makes the test flaky, so it's not
effective.



![Screenshot from 2024-09-26
11-26-34](https://github.com/user-attachments/assets/d4f7684f-6fc6-481f-9d47-a65656c8989a)


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

## **Related issues**

Fixes: #27387

## **Manual testing steps**

1. Check ci
2. Run test locally `yarn test:e2e:single
test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js
--browser=chrome`

## **Screenshots/Recordings**

Problem in FF and Webpack, see how popup is open and closed, and then a
new popup is open with the transaction.



https://github.com/user-attachments/assets/c17ff7bd-6b1d-4517-b33f-95f7ac6d3120


Problem in Webpack, where tx does not open after the change networks


https://github.com/user-attachments/assets/2b626159-ec37-4b3c-9c91-80ab4011f751





Problem Webpack, see how popup is open and closed, and then a new popup
is open with the transaction.



https://github.com/user-attachments/assets/8165b3e7-2ed4-4704-91dc-82776edb0bd8




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



## **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/develop/.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/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.
…w` (#27417)

<!--
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**
Before clicking Confirm, we wait until the transaction gas and amount
are loaded to avoid any possible rerender.
We also login with balance validation, so we can get rid of the initial
delay.


https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/102392/workflows/75210923-91d6-44cc-b224-72f3f530dbb2/jobs/3815538/tests


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

## **Related issues**

Fixes: #27418

## **Manual testing steps**

1. Check ci
2. Run test locally `yarn test:e2e:single
test/e2e/tests/responsive-ui/metamask-responsive-ui.spec.js
--browser=chrome --leave-running=true`

## **Screenshots/Recordings**

![Screenshot from 2024-09-26
12-18-20](https://github.com/user-attachments/assets/604b995f-7db0-4d52-b129-351d82d0831e)


## **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.
…ing secret recovery phrase to recover account with non-zero balance @no-mmi`aded (#27420)

<!--
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**
In the process for creating a new account, we get to see this error:

```
TimeoutError: Waiting for element to be located By(css selector, [data-testid="account-list-menu-details"])
Wait timed out after 10023ms
  (Ran on CircleCI Node 17 of 20, Job test-e2e-chrome)
    at /home/circleci/project/node_modules/selenium-webdriver/lib/webdriver.js:929:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
This happens after clicking the account menu, and after clicking the Add
account. It seems that the click doesn't hit exactly the button due to
the account list loading, making the button move. When the account list
is loaded, the click is performed outside the button boundary, and this
makes the popup close and you cannot find the next element:
"account-list-menu-details" element.

I haven't been able to reproduce this but I've seen this behaviour in
the manual process

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

## **Related issues**

Fixes: those 3 are fixed in this PR, as they were caused by the same
issue

- #27419
- #27337
- #27336

## **Manual testing steps**

1. Check ci
2. Run tests locally

## **Screenshots/Recordings**



<!-- [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**
Changes include
* redux actions to set the selected src/dest tokens and token amount
* redux selectors to get the selected src/dest tokens and token amount


<!--
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/26212?quickstart=1)

## **Related issues**

Fixes:  https://consensyssoftware.atlassian.net/browse/METABRIDGE-866

## **Manual testing steps**

N/A. This doesn't change any user functionality, just setting up
getters/setters

## **Screenshots/Recordings**

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

N/A, redux state changes will take effect after UI for inputs is
implemented

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

This PR is to remove the unused closeMenu prop from
ConnectedAccountsMenu
## **Related issues**

Fixes: #27454 

## **Manual testing steps**

1. Go to the connections page
2. click on three dot menu for connected accounts
3. everything should be working as it is

## **Screenshots/Recordings**

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

### **Before**

NA
### **After**

NA
## **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.
#27457)

…ring error


<!--
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 original code assumes that getMethodData will always return an
object with a name property. However, in certain instances,
getMethodData can return null. When this happens, destructuring the name
property from null causes a runtime error.

To address this issue, the code has been updated to use optional
chaining. This ensures that if getMethodData returns null, the
destructuring will not occur, and contractMethodName will be set to
undefined instead of causing an error.

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

## **Related issues**

Fixes: #27436

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

This PR fixes: `test/e2e/tests/confirmations/signatures/permit.spec.ts`

Issue was that e2e were passing in CI, but failing locally. The changes
here provide a few helpers to prevent this flakey behavior.

The issue was first flagged here:
#27184 (comment)

Follow up slack thread here:
https://consensys.slack.com/archives/C03ETQA9EPK/p1727373903173259

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

## **Related issues**

Fixes: `test/e2e/tests/confirmations/signatures/permit.spec.ts` when
running chrome e2e locally

## **Manual testing steps**

1. Running `permit.spec.ts` should pass e2e chrome locally and in CI

## **Screenshots/Recordings**

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

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/develop/.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/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.

Co-authored-by: Nick Gambino <[email protected]>
…es (#27412)

Vaibhav asked for new Sentry reporting rates from CircleCI:
- 10 times as frequent from the `develop` branch
- Never from other branches

I also put in an override, such that if your Git message includes
`[flags.sentry.tracesSampleRate: x.xx]` (a decimal number from 0.00 to
1.00), it will set `tracesSampleRate` to that fraction.

Moved what used to be at `_flags.doNotForceSentryForThisTest` to
`_flags.sentry.doNotForceSentryForThisTest`
<!--
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 adds `useLedgerConnnection` hook unit tests.

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

## **Related issues**

Fixes: -

## **Manual testing steps**

No QA needed.

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

The Sentry trace sample rate for production has been doubled, to take
advantage of increased Sentry transaction quotas for our account.

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

## **Related issues**

Closes #27467

## **Manual testing steps**

It's not easy to test this because it's probabilistic.

## **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/develop/.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/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.
…tiates multiple signatures and rejects all` (#27481)

<!--
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 delay for waiting the signatures to be queued, which
sometimes is not enough. In this fix, we remove the delay and we add
conditions to wait for (each new signature is added in the navigation),
so the behaviour is deterministic.

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

## **Related issues**

Fixes: #27480

## **Manual testing steps**

1. Check ci
2. Run test locally `yarn test:e2e:single
test/e2e/tests/confirmations/navigation.spec.ts --browser=chrome
--leave-running=true`

## **Screenshots/Recordings**

See how the last signature is not properly queued, so in the last screen
we don't see the navigation. We should wait on each new signature to be
added in the navigation queue, before adding a new one


https://github.com/user-attachments/assets/4637fb21-aeb5-4b4f-b2c2-b03b349211a1



## **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/develop/.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/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.
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

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

The back button brings the user to the stepper for ERC20 token transfer.

This PR includes creating a placeholder component for token transfer
confirmations. It also includes 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/27391?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3218

## **Manual testing steps**

1. Enable redesign on developer options.
2. Initiate transfer from an erc20 token in the wallet.
3. The confirmation in the screenshot below should appear.

## **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="320" alt="Screenshot 2024-09-25 at 11 14 03"
src="https://github.com/user-attachments/assets/dd1b91ed-78f4-4f0e-8bcb-4d9d6ca4c43b">

## **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.
This PR is to update the following UI changes in the connect and the new
permissions page

## **Description**

* Fix the Typography
* Update background color on Connect Page
* Don't show header on review permissions page

## **Related issues**

Fixes: 

## **Manual testing steps**

1. Run extension with `CHAIN_PERMISSIONS=1 yarn start`
2. Check the following changes in Connect Page: Background color is
fixed, Typography looks aligned with design, Bottom learn more message
3. Fix Permissions Page: Typography is fixed, the list item has border
radius and proper padding, three dot menu replaced by Edit button

## **Screenshots/Recordings**


### **Before**
![Screenshot 2024-09-30 at 3 53
23 AM](https://github.com/user-attachments/assets/98aeb9f2-df44-46af-b2f2-777002228c64)

![Screenshot 2024-09-30 at 3 53
09 AM](https://github.com/user-attachments/assets/ade555e9-fbb2-424b-bc15-31af8a50e1b4)


### **After**
## Connect Page

![Screenshot 2024-09-30 at 4 01
38 AM](https://github.com/user-attachments/assets/818b2ef1-bf43-4eb3-890f-8b45eb29c50b)

## Permission Page
![Screenshot 2024-09-30 at 3 52
38 AM](https://github.com/user-attachments/assets/dd488013-2cd8-41df-ba5f-681daf48df93)

## **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.
This is a cherry-pick of #28090 for v12.6.0. Original description:

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

Bumps `@metamask/queued-request-controller` to fix queueing issue with
Chain Permission `wallet_switchEthereumChain` and
`wallet_addEthereumChain` when switching to a previously permitted chain
and with `wallet_addEthereumChain` not being enqueued when it still
should be.

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

## **Related issues**

Related: MetaMask/core#4846
Fixes: #28101
Fixes: #27977
Fixes: #28102

## **Manual testing steps**

The easiest way to test this would be a combination of using the test
dapp and the following request to switch chains
```
await window.ethereum.request({
 "method": "wallet_switchEthereumChain",
 "params": [
  {
    chainId: "0x1"
  }
],
});
```

The behaviors you should see include:
**One dapp:**
* On a dapp permissioned for chain A and B, on chain A, queue up several
send transactions, then use wallet_switchEthereumChain to switch to
chain B. The send transactions should NOT get cleared immediately after
requesting the chain switch. Chain switch should NOT happen until the
previous approvals are approved/rejected.
* On a dapp permissioned for chain A and B, on chain A, queue up one
send transaction, then use wallet_switchEthereumChain to switch to chain
B, then queue up several more send transactions. Reject/approve the
first transaction. Afterwards, you should see chain B as the active
chain for the dapp, and all subsequent approvals cleared/rejected
automatically.
* On a dapp permissioned for ONLY chain A, on chain A, queue up one send
transaction, then use wallet_switchEthereumChain to switch to chain B,
then queue up several more send transactions. Reject/approve the first
transaction. Afterwards, you should an approval prompt for adding chain
B. If you approve it, the dapp should then be on chain B, with all
subsequent approvals cleared/rejected. If you disapprove it, you should
be prompted with the subsequent approvals.
* On a dapp permissioned for ONLY chain A, on chain A,
wallet_switchEthereumChain to switch to chain B, then queue up several
more send transactions. Reject/approve the first transaction.
Afterwards, you should an approval prompt for adding chain B. If you
approve it, the dapp should then be on chain B, with all subsequent
approvals cleared/rejected. If you disapprove it, you should be prompted
with the subsequent approvals.

**Two dapps:**
* On a dapp permissioned for chain A, on chain A, queue up several send
transactions, On a separate dapp permissioned for chain A and B, on
chain A, use wallet_switchEthereumChain to switch to chain B. The send
transactions should NOT get cleared immediately after requesting the
chain switch. Chain switch should NOT happen until the previous
approvals are approved/rejected.
* On a dapp permissioned for chain A and B, on chain A, queue up one
send transaction. On a separate dapp permissioned for chain A and B, on
chain A, use wallet_switchEthereumChain to switch to chain B. Then on
the first dapp queue up several more send transactions. Reject/approve
the first transaction. Afterwards, you should see chain B as the active
chain for the second dapp, and then you should still be prompted with
the subsequent approvals for the first dapp.
* One one dapp, start a wallet_addEthereumChain for a chain that does
not exist in the wallet and leave the approval alone. On a different
dapp, do the same thing. Only the request from the first dapp should be
accessible (i.e. no scrubbing between both of them). After rejecting the
first request, the second request should then appear (which will look
exactly the same of course). Wallet should not lock up if you repeat
this and accept either of the requests

## **Screenshots/Recordings**

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

### **Before**

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

### **After**


https://github.com/user-attachments/assets/2634119f-67db-4866-8520-9320a9400b1d



https://github.com/user-attachments/assets/c78c13ab-ea4f-4420-bccc-70959786e8db



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

---------

Co-authored-by: jiexi <[email protected]>
Co-authored-by: MetaMask Bot <[email protected]>
naugtur
naugtur previously approved these changes Oct 31, 2024
Copy link
Contributor

@naugtur naugtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signoff from LavaMoat team on related items

danjm and others added 3 commits October 31, 2024 11:31
<!--
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**

Cherry-pick PR #28221

<!--
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/28223?quickstart=1)

Co-authored-by: Mark Stacey <[email protected]>
benjisclowder and others added 2 commits October 31, 2024 16:00
## **Description**

Adding 12.6.0 changelog entries.

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

---------

Co-authored-by: Dan J Miller <[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/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/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.
@metamaskbot
Copy link
Collaborator

Builds ready [3df0a16]
Page Load Metrics (1866 ± 115 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint163524861861225108
domContentLoaded16192326181318288
load163625771866239115
domInteractive208246189
backgroundConnect10309546632
firstReactRender49198873818
getState5123273015
initialActions01000
loadScripts11641759133814771
setupStore11118322713
uiStartup181535442109395190
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -168.37 KiB (-3.37%)
  • ui: 4.01 KiB (0.05%)
  • common: 107.58 KiB (1.36%)

@hjetpoluru
Copy link
Contributor Author

Testing has been completed for v12.6.0 with all the assigned PRs and sign-off from the extension platform team.

This is a cherry-pick of #28218 for v12.6.0. Original description:

## **Description**

The Home screen was recently updated to make the overview left-aligned.
However the fullscreen UI was not considered, and it ended up looking
ugly/broken.

The fullscreen UI has been updated to be centered, as it was before. The
Home screen remains left-aligned in the popup.

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

## **Related issues**

Fixes #27593

## **Manual testing steps**

Compare how the Home screen overview looks on the fullscreen UI and the
popup. It should be centered on the fullscreen UI, left-aligned on the
popup.

## **Screenshots/Recordings**

### **Before**

![Screenshot 2024-10-31 at 11 32
12](https://github.com/user-attachments/assets/989ebd4e-90a5-42ae-a522-f7e4d77f0685)

### **After**

![Screenshot 2024-10-31 at 11 28
35](https://github.com/user-attachments/assets/6802bfab-b462-4168-8536-cabb49aceb53)

## **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/develop/.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/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.
… (#28183)

Cherry-pick: #28179

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

Previously there was a bug that affected the approve screen. When users
had a small spending cap (between 0.001 and 0.0001 or smaller), it was
coerced to 0.

This was caused by the method `new
Intl.NumberFormat(locale).format(spendingCap)` that applied the `1,000`
large number formatting, so the fix is to bypass it entirely for values
smaller than 1.

Additionally, these unformatted small numbers are presented in
scientific notation, so we leverage `toNonScientificString(spendingCap)`
to prevent that.

<!--
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/28179?quickstart=1)

## **Related issues**

Fixes:
[#28117](#28117)

## **Manual testing steps**

See original bug report.

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

<!--
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/28183?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/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.
@metamaskbot
Copy link
Collaborator

Builds ready [f644102]
Page Load Metrics (1974 ± 120 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint159424531970249119
domContentLoaded158223861930241116
load159724521974251120
domInteractive25141502613
backgroundConnect12164494622
firstReactRender522991276933
getState5117283115
initialActions01000
loadScripts112018491432208100
setupStore1196412612
uiStartup178130822298373179
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -168.37 KiB (-3.37%)
  • ui: 4.42 KiB (0.06%)
  • common: 107.58 KiB (1.36%)

@danjm
Copy link
Contributor

danjm commented Nov 1, 2024

@SocketSecurity ignore-all

I believe all are either maintained by Metamask, expected and necessary network access, or in the dependency tree because of @solana/web3.js which is a dependency of trezor libraries, but our use of trezor libraries does not depend on the solana library

@danjm danjm merged commit f8dd9f5 into master Nov 1, 2024
78 of 79 checks passed
@danjm danjm deleted the Version-v12.6.0 branch November 1, 2024 03:26
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extension-delivery INVALID-PR-TEMPLATE PR's body doesn't match template release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.