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

chore: Version v12.7.0 #28230

Closed
wants to merge 314 commits into from
Closed

chore: Version v12.7.0 #28230

wants to merge 314 commits into from

Conversation

hjetpoluru
Copy link
Contributor

@hjetpoluru hjetpoluru commented Oct 31, 2024

Description

Version v12.7.0

Open in GitHub Codespaces

cryptodev-2s and others added 30 commits October 4, 2024 14:53
<!--
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**

Migrate AccountTrackerController to BaseController v2

PS: Should be merged after the conversion to typescript is merged
#27231

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

## **Related issues**

Fixes:
[#25929](#25929)

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

- [ ] 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 error when tokensMarketData sometimes resolves with a
small delay which will result in an app error;


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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Switch networks back and forth and you should not see the app crash

## **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**
#### Bridge changes
* Implements a `selectDestNetwork` bridge controller action, which sets
a state value for the destination network for bridged funds
* On dest network selection, the controller fetches the bridgeable
tokens for the network and also the top assets list


#### Swaps changes
* Exports the `TOKEN_VALIDATORS` constant in order to reuse it for
bridge token list validation
* Splits the `fetchTopAssets` util into 2 methods: `fetchTopAssetsList`
validates topAssets and returns a list, and `fetchTopAssets` reduces the
validated assets list into a mapping

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

## **Related issues**

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

## **Manual testing steps**

N/A. This doesn't change user functionality for swaps or bridging, just
setting up getters/setters

## **Screenshots/Recordings**

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

New values added to state: 
```
{
  metamask: {
    bridgeState: {
      destTokens: {
        [tokenAddress.toLowerCase()]: { ...tokenDetails }
      },
      destTopAssets: [
        // list of tokens sorted by popularity
      ],
    }
  }
}
```

- [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.
…#27521)

<!--
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 adds an additional delay to the 500ms delay to allow CI to actually
scroll to the correct place before clicking an element.

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

## **Related issues**

Fixes: #26804 

## **Manual testing steps**

1. Does CI Pass every time?


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

* Implements a `selectSrcNetwork` bridge controller action, which sets a
state value for the cross-chain swaps source network
* On src network change, the controller fetches the bridgeable tokens
for the network and also the top assets list
* Adds a call to the `useBridging` hook within the bridge route, which
sets the src network, tokens and topAssets when the bridge experience is
loaded

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

## **Related issues**

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

## **Manual testing steps**

N/A, changes only affect state and are not visible

## **Screenshots/Recordings**

New values added to state: 
```
{
  metamask: {
    bridgeState: {
      srcTokens: {
        [tokenAddress.toLowerCase()]: { ...tokenDetails }
      },
      srcTopAssets: [
        // list of tokens sorted by popularity
      ],
    }
  }
}
```


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

Updating packages to use versions coming from the new [accounts
monorepo](https://github.com/MetaMask/accounts).

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

## **Related issues**

Related to:

- MetaMask/accounts#39
- MetaMask/accounts#50
- MetaMask/accounts#54
- MetaMask/core#4713
- MetaMask/core#4734
- MetaMask/snap-simple-keyring#156
- MetaMask/snap-watch-only#52
- MetaMask/snap-bitcoin-wallet#255
- MetaMask/snap-account-abstraction-keyring#142

## **Manual testing steps**

Test parts of the extension that closely related to accounts management
+ HW wallets support.

## **Screenshots/Recordings**

### **Before**

### **After**

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

Getting rid of the asterisk and the "Balance may be outdated" message
for now.

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

## **Related issues**

N/A

## **Manual testing steps**

1. `yarn start:flask`
2. Enable Bitcoin support: Settings > Experimental > "Enable Bitcoin
support"
3. Create a Bitcoin account
4. You should not see any yellow asterisk anymore

## **Screenshots/Recordings**

### **Before**

![Screenshot 2024-10-04 at 18 16
54](https://github.com/user-attachments/assets/c92185ce-7a44-4c13-ac3b-e5a54bd0c798)

### **After**

![Screenshot 2024-10-04 at 18 16
21](https://github.com/user-attachments/assets/47b3dc59-1fb7-4ea3-bcd2-e015ae6f9705)

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

Fixing Sentry error.

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

## **Related issues**

Fixes:
https://metamask.sentry.io/issues/5931324954/?environment=production&project=273505&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20release%3A%5B12.3.0%2C12.3.1%5D%20is%3Anew&referrer=issue-stream&sort=freq&statsPeriod=7d&stream_index=15

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

Fixes Sentry error.

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

## **Related issues**

Fixes:
https://metamask.sentry.io/issues/5925202820/?environment=production&project=273505&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20release%3A%5B12.3.0%2C12.3.1%5D%20is%3Anew&referrer=issue-stream&sort=freq&statsPeriod=7d&stream_index=9

## **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.
…ge object modal (#27327)

## **Description**

This pull request migrates the remove snap account test to the Page
Object Model (POM) pattern, enhancing code maintainability and improving
test reliability. It also:
- Created Snap Simple Keyring page class
- Created Snap List page class
- Avoided delays in the initial implementation for functions on the Snap
Simple Keyring page

## **Description**

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

## **Related issues**

Fixes: #27484  #27652

## **Manual testing steps**
Check code readability, make sure tests 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/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: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Chloe Gao <[email protected]>
Co-authored-by: chloeYue <[email protected]>
Co-authored-by: seaona <[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**
This PR fixes an anti-pattern in our e2e tests, where we assert that an
element value is equal to a condition. This opens the door to a race
condition where the element is already present, but not the value we
want yet, making the assertion to fail.
We should find the element by its value, instead of asserting its inner
value.



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

## **Related issues**

Fixes: #19870
Note: we will need several PRs to address all the occurrences, so we
cannot close the issue yet, despite merging this first PR


## **Manual testing steps**

1. Check ci

## **Screenshots/Recordings**

n/a
<!-- [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**

Addresses QA and design reviews, including various spacing issues, and a
correction on the loader behaviour for the confirmations.

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

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3402

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

Changes the survey time so that users check on a new survey every day
instead of every week

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

Upgrade the `TransactionController` to:

- Support Etherscan API keys when polling for incoming transactions.
- Populate `submitHistory` to aid with debug and persist even when
resetting the account.

Also adds the `ETHERSCAN_API_KEY` environment variable.

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

## **Related issues**

## **Manual testing steps**

1. Verify incoming transactions work on Mainnet and Sepolia with an API
key set.
2. Verify `submitHistory` is populated in state logs after creating
transactions and retrying, on both Infura and custom networks.

## **Screenshots/Recordings**

### **Before**

### **After**

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

We were wrongly displaying some percentage (with Ethereum token values)
for Bitcoin, but we don't have any data for Bitcoin right now, so we
just get rid of those for now.

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

## **Related issues**

N/A

## **Manual testing steps**

1. `yarn start:flask`
2. Make sure to select Ethereum mainnet (we do not display any
percentage for testnets)
3. Enable Bitcoin support: Settings > Experimental > "Enable Bitcoin
support"
4. Create a Bitcoin account
5. You should not see any percentage on the token tab

## **Screenshots/Recordings**

### **Before**

![Screenshot 2024-10-04 at 18 28
32](https://github.com/user-attachments/assets/e939cfb5-54bf-43e2-bf8e-49c5363c6e05)
![Screenshot 2024-10-04 at 18 28
38](https://github.com/user-attachments/assets/91d44bb8-8eb6-475c-885e-b773af0f76b6)


### **After**

![Screenshot 2024-10-04 at 18 27
26](https://github.com/user-attachments/assets/41495464-98f3-400e-b15e-bf412b26ff11)


## **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 adds a new dependency, [Lottie](https://airbnb.io/lottie), to
the extension. Lottie is an animation library.

The pros:
* Enhanced User Experience: Lottie enables us to add high-quality,
lightweight animations that will make our extension more visually
appealing.
* Community Support: It is well-maintained by Airbnb and has a strong
community behind it.
* Consistency with Mobile App: We’re already using Lottie in mobile, so
integrating it into the extension will provide a consistent user
experience across platforms.

With any additional dependency, we need a consider:
* supply chain attack surface managed by lavamoat.
* increase in bundle size – in this case < 100kB gzip-ed.

[More context on
slack](https://consensys.slack.com/archives/CTQAGKY5V/p1717772021376029).

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

## **Related issues**

* **Related:** #27650
– use lottie animation in the extension.

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

---------

Co-authored-by: MetaMask Bot <[email protected]>
Co-authored-by: legobeat <[email protected]>
…s page (#27650)

## **Description**
Animations and cosmetic changes to smart transaction status page.

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

## **Related issues**

Fixes:
* https://consensyssoftware.atlassian.net/browse/TXL-366
* https://consensyssoftware.atlassian.net/browse/TXL-413
* https://consensyssoftware.atlassian.net/browse/TXL-365
* https://consensyssoftware.atlassian.net/browse/TXL-412

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


https://github.com/user-attachments/assets/e05e6333-9300-41ad-9c0e-f55b2f30e2a8




### After


https://github.com/user-attachments/assets/fcaa4b2e-5b49-4c8e-92a0-9721751407c5




<!-- [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.

---------

Co-authored-by: MetaMask Bot <[email protected]>
Co-authored-by: legobeat <[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.
-->

**This  PR is dependant on #24503** 
## **Description**

- Added a new functional component as an entry to the Security & Privacy
tab with the `Delete MetaMetrics Data` button.
- A new Delete MetaMetrics Data model will open when you click the
button.
- Clicking the `Clear` button in the modal will create a data deletion
regulation, update the state, and close the modal, deactivating the
`Delete MetaMetrics Data` button.
- The Erroring on the `Clear` button click opens a new error modal.

**Scenarios to disable the DeleteMetaMetrics button:**


1. Metametrics ID not created / not available
2. Just performed a deletion independent on participate in metametrics
toggle
3. Participate in metric opt-out & no data is recorded after deletion.
4. Status of current delete regulation as INITIALIZED, RUNNING, or
FINISHED and (Participate in metric opt-out/no data recorded after
deletion)


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

## **Related issues**

Fixes #24406, #24407,
https://github.com/MetaMask/MetaMask-planning/issues/2523
## **Manual testing steps**

Perquisite:
Provide the following details in the `.metamaskrc` file:
```
ANALYTICS_DATA_DELETION_SOURCE_ID="wygFTooEUUtcckty9kaMc"
ANALYTICS_DATA_DELETION_ENDPOINT="https://proxy.dev-api.cx.metamask.io/segment/v1"
```

1. Make a build(`yarn`, `yarn dist`) against the code.
2. Load the extension in any browser.
3. Navigate to the "Security & privacy" in the Settings 
4. Click on the "Delete MetaMetrics data" button which enables when the
"Participate in MetaMetrics" is selected.
5. Validate the post request is made in the service worker with the id -
`wygFTooEUUtcckty9kaMc`.

## **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 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: seaona <[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/27581?quickstart=1)

Fixes test coverage quality gates. 

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3328

## **Manual testing steps**

1. Test coverage should be correctly reported/validated

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

This is one small step in the larger task to refactor routing, in order
to speed up load time (MetaMask/MetaMask-planning#2898)

The changes are mostly to increase DRY, and to make a closer coupling
between connected routes and their analytics tracking names.

I wanted to get this in separately in order to reduce complexity and
merge conflicts later.

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

## **Related issues**

Progresses: MetaMask/MetaMask-planning#2898

## **Manual testing steps**
## **Screenshots/Recordings**
### **Before**
### **After**
## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
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
- [ ] 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/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: legobeat <[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**
This PR aims to fix the banner alert to support rendering multiple
alerts. Previously we only rendered one alert and if there were more
alerts we rendered the banner with a default copy informing the user
there are multiple alerts.

- Fixed padding on the alerts modal based on
[figma](https://www.figma.com/design/gcwF9smHsgvFWQK83lT5UU/Confirmation-redesign-V4?node-id=3355-12480&node-type=frame&t=3Vbe0qFcmcfN5uCG-0)
- Fixed bug Contract Interaction and Alerts - 'Cannot read properties of
undefined (reading 'key')`
<!--
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/27339?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#2873
#27238

## **Manual testing steps**

1. Create a transaction with high nonce
2. Go to test dapp
3. Trigger a malicious transaction from PPOM session

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

![Screenshot from 2024-09-23
13-38-10](https://github.com/user-attachments/assets/f4cbe8ee-7217-4718-998a-2016c9c60b88)

![Screenshot from 2024-09-23
14-09-42](https://github.com/user-attachments/assets/abb8c0c0-8cb8-4230-9469-d0b8b9f2a9a1)

![Screenshot from 2024-09-23
14-21-53](https://github.com/user-attachments/assets/0747e0d0-d50f-4f59-9a9e-0baefb4d9b5e)


[bug.webm](https://github.com/user-attachments/assets/eb447959-78f0-4ccc-a554-cca272e59b19)


<!-- [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.

---------

Co-authored-by: Ariella Vu <[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/27691?quickstart=1)

Fixes an issue with test coverage quality gates.

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3328

## **Manual testing steps**

1. Test coverage should be correctly reported/validated

## **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/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.
This PR is automatically opened to update the coverage.json file when
test coverage increases. Coverage increased from 0% to 71%.

Co-authored-by: MetaMask Bot <[email protected]>
## **Description**

The `isBtcTestnetAddress` was fragile and was mainly relying on
`isBtcMainnetAddress` and `isEthAddress` to work. However if both of
those functions were falsy, then `isBtcTestnetAddress` would become
truthy (which is not always correct).

It was spotted with some testing with a "wrong" eth addresss that we use
in some tests: `0x0`

```ts
const addr = '0x0';
isEthAddress(addr);        // false <- yes, this is false based on this: https://github.com/MetaMask/utils/blob/v9.2.1/src/hex.ts#L15-L22
isBtcMainnetAddress(addr); // false
isBtcTestnetAddress(addr); // true <- THIS IS WRONG
```

We now rely on a third party library that will test against multiple BTC
format addresses (legacy, segwit, etc...)

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

## **Related issues**

N/A

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

### **Before**

### **After**

## **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 fixes an anti-pattern in our e2e tests, where we assert that an
element value is equal to a desired value. This opens the door to a race
condition where the element is already present, but it does not have the
value we want yet, making the assertion to fail.
We should find the element by its value, instead of asserting its inner
value.

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

## **Related issues**

Fixes: #19870
Note: this is the second PR for this work. The first PR was merged
[here](#27606)

## **Manual testing steps**

1. Check ci

## **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.
<!--
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.
-->
Part of #23014 
Fixes #23470 

Converting the level 6 dependency file
`app/scripts/lib/rpc-method-middleware/handlers/log-web3-shim-usage.js`
to typescript for contributing to `metamask-controller.js`.
## **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/23732?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 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 adds a new entry in the developer menu dedicated to Profile
syncing.
The first entry is dedicated to resetting the account sync data.

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

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NOTIFY-1193

## **Manual testing steps**

1. Go to developer settings
2. Reset account sync data
3. Reload or reinstall the extension

## **Screenshots/Recordings**


### **Before**

### **After**

![Capture d’écran 2024-10-07 à 16 48
57](https://github.com/user-attachments/assets/5356d551-05c9-4769-a122-232d68c1c7f8)

## **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: Derek Brans <[email protected]>
Co-authored-by: legobeat <[email protected]>
Co-authored-by: Niranjana Binoy <[email protected]>
Co-authored-by: seaona <[email protected]>
Co-authored-by: Norbert Elter <[email protected]>
Co-authored-by: Howard Braham <[email protected]>
… dev env to the existing offboarding page (#27226)

With this PR, we are ensuring that only `build-main` is redirected to
the offboarding page. Also, the user will not be redirected to the
offboarding page while uninstalling a development build.

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

## **Related issues**

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3239

## **Manual testing steps**

For development build:
1. Load the application after running `yarn start`
2. Create/import a wallet.
3. Uninstall the extension
4. Verify that the user is not redirected to the offboarding page.

For a production-like build (for which the offboarding page will be
loaded)
1. Load the application after running `yarn build:test`
2. Crate/import a wallet.
3. Uninstall the extension
4. Verify that the user is redirected to the offboarding page.

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

Add the following tags to the `UI Startup` trace to help identify
correlations in startup performance:

- `wallet.account_count`
  - Total number of all accounts in wallet.
- `wallet.nft_count`
- Total number of all NFTs in the wallet, across all accounts and
chains.
- `wallet.notification_count`
  - Total number of notifications in the wallet.
- `wallet.pending_approval`
- Approval type of the first pending approval. e.g. `transaction`,
`eth_signTypedData`
- `wallet.token_count`
- Total number of ERC-20 tokens in the wallet, across all chains and
accounts.
- `wallet.transaction_count`
- Total number of transactions currently in the wallet, across all
accounts, chains, and statuses.
- `wallet.unlocked`
- `true` or `false` based on if the wallet is currently locked and
requires a password.
- `wallet.ui_type`
  - Type of UI being loaded. e.g. `popup`, `notification`, `fullscreen`

Tags with a `number` value are Sentry measurements to allow querying
with greater than and less than logic.

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

## **Related issues**

Fixes:
[#3379](MetaMask/MetaMask-planning#3379)
[#3273](MetaMask/MetaMask-planning#3273)

## **Manual testing steps**

## **Screenshots/Recordings**

### **Before**

### **After**

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
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: Mark Stacey <[email protected]>
)

## **Description**

Updates `getAddTransactionRequest` to pass through additional parameters
so that `waitForSubmit` will get passed through to `addTransaction` .

Previously, the `waitForSubmit` param, although passed by
`addTransaction` and `addTransactionAndWaitForPublish`, was not included
in the object returned by `getAddTransactionRequest`. This doesn't seem
to have had negative consequences on a standard wallet, but when using a
hardware wallet, it meant that `addTransactionAndWaitForPublish`
resolved before waiting for the user to accept or reject the
transaction. As a consequence, when doing a swap, the user was taken
directly to the "Processing..." screen before they had a chance to take
action on the transaction. If they rejected the transaction, they
remained on that screen indefinitely.

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

## **Related issues**

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

## **Manual testing steps**

1. Disable smart transactions
2. Confirm that the following flows work and display relevant and
expected screens using both a hardware and standard wallet:
* Swap that does not need approval step - accept tx
* Swap that does not need approval step - reject tx
* Swap that needs approval step - reject approval tx
* Swap that needs approval step - accept approval tx, reject trade tx
* Swap that needs approval step - accept both txs
* Send + swap that does not need approval step - accept tx
* Send + swap that does not need approval step - reject tx
* Send + swap that needs approval step - reject approval tx
* Send + swap that needs approval step - accept approval tx, reject
trade tx
* Send + swap that needs approval step - accept both txs

## **Screenshots/Recordings**

### **Before**

Video from bug report (shows rejecting swap flow):


https://github.com/user-attachments/assets/bdaa32f1-2c1d-4e23-a97d-9d370baaaf2f

### **After**

Accepting swap:


https://github.com/user-attachments/assets/bbe99cb3-fa3f-4580-a472-20b3b4a94f31

Rejecting swap:


https://github.com/user-attachments/assets/e6ecd2dc-a1a0-4d51-8428-45d19d3a269e


## **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: Derek Brans <[email protected]>
georgeweiler and others added 8 commits October 30, 2024 16:59
## **Description**

This PR updates copy on certain ramps components to satisfy UK
regulatory requirements. The copy changes have been reviewed and
approved by legal and the user experience content team.

The Ramps Banner has been removed on the NFT tab for similar reasons.

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

## **Related issues**

Fixes:

## **Manual testing steps**

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

## **Screenshots/Recordings**


### **Before**

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

### **After**

<img width="360" alt="Screenshot 2024-10-29 at 9 55 31 AM"
src="https://github.com/user-attachments/assets/080f67f0-4e35-442d-a1f6-87dab56c1a8e">
<img width="1728" alt="Screenshot 2024-10-29 at 9 55 20 AM"
src="https://github.com/user-attachments/assets/ff43af2a-00da-4b48-bb69-3cc90ba9078c">
<img width="386" alt="Screenshot 2024-10-29 at 9 55 09 AM"
src="https://github.com/user-attachments/assets/802fd5ac-6094-46b8-8053-d1e79b46c1cb">

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

Add a new `transaction_contract_address` prop into anonymised
transaction events.

## **Related issues**


## **Manual testing steps**

1. Submit a dapp transaction and check for anonymised events in the
Network tab. The new prop will be there.

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

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

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

## **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: MetaMask Bot <[email protected]>
## **Description**

The "Delete MetaMetrics Data" e2e tests were recently broken due to a
change in CI configuration. The code-under-test was written to always
use the environment variable present for the data deletion source ID and
endpoint, but the e2e tests wrongly assumed that it would never be
present.

The service has been updated to use the fallback values for e2e test
builds, even if the environment variable is present.

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

## **Related issues**

Fixes CI failure currently on all branches (e.g.
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/108823/workflows/cbc57b89-8647-4219-b413-24df4fdad95c/jobs/4070258
)

This bug was introduced in #24503, but only began causing failures
recently when CI configuration was updated with these new environment
variables.

## **Manual testing steps**

See that the data deletion e2e tests succeed even with both data
deletion environment variables set.

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

Leverages MetaMask/core#4852 to fetch native
currency prices across all evm chains, instead of just the current
chain.

Metamask will now hit the `/pricemulti` endpoint of cryptocompare to
fetch an array of currencies in 1 request.

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

## **Related issues**

Fixes:

## **Manual testing steps**

No user facing changes.

1. Add some networks with native currencies other than ETH like polygon,
bnb
2. Verify native tokens have the correct fiat price
3. Export state and verify `currencyRates` has entries for each native
currency

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

---------

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

This PR adds UI rendering capabilities for debugging UI integration
tests. It introduces the jest-preview package to allow visual inspection
of component states during test execution.

For jest-preview to properly render the page being tested in the UI
integration test, we need to provide it with the bundled css as well as
with the relevant static assets.
To do that we have also introduced a minimal build script for UI
integration tests, that outputs to `test/integration/config/assets/`.
For consistency with actual application build process, the build script
re-uses a lot of the existing build methods.

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

## **Related issues**

N/A

## **Manual testing steps**

1. Run the UI integration tests with the new debug rendering enabled
2. Verify that component states can be visually inspected during test
runs

## **Screenshots/Recordings**
Output of the `debug()` in a UI integration test.
![Screenshot 2024-10-23 at 12 01
04](https://github.com/user-attachments/assets/411fc8da-2431-485c-94b7-761faee2487a)


## **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: MetaMask Bot <[email protected]>
## **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.
## **Description**

The provider metrics for `wallet_addEthereumChain` and
`wallet_switchEthereumChain` are tracked more effectively now. They are
no longer rate-limited to 0.1%, instead we track 100% of these calls.
They also now include the chain ID being added or switched to.

It was deemed safe to disable rate limiting here because historically
these methods have required user confirmation, so it's not likely that a
dapp would send them repeatedly in a short time frame. Volume should be
on a similar scale to other manual user confirmations like signatures.

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

## **Related issues**

Fixes MetaMask/MetaMask-planning#3520

## **Manual testing steps**

* Build the wallet using the instructions listed here for debugging with
the mock Segment API:
https://github.com/MetaMask/metamask-extension/blob/develop/development/README.md#debugging-with-the-mock-segment-api
* Connect to the test-dapp
* Trigger `wallet_addEthereumChain` and `wallet_switchEthereumChain`,
and see that they are correctly captured as metric events.

## **Screenshots/Recordings**

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

### **Before**

N/A

### **After**


https://github.com/user-attachments/assets/910a1572-74fa-4ecf-8a5d-6f0856757207

Unfortunately the mock Segment server doesn't show the parameters. But
it does show that the event was received.

## **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.
@hjetpoluru hjetpoluru added team-extension-platform extension-delivery INVALID-PR-TEMPLATE PR's body doesn't match template release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 31, 2024
@hjetpoluru hjetpoluru requested review from a team and kumavis as code owners October 31, 2024 21:01
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.

@danjm danjm closed this Nov 1, 2024
@danjm danjm deleted the Version-v12.7.0 branch November 1, 2024 04:28
@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.7.0 Issue or pull request that will be included in release 12.7.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.