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 v11.16.0 #24242

Open
wants to merge 115 commits into
base: master
Choose a base branch
from
Open

Version v11.16.0 #24242

wants to merge 115 commits into from

Conversation

benjisclowder
Copy link
Contributor

@benjisclowder benjisclowder commented Apr 25, 2024

RC 11.16.0

micaelae and others added 30 commits April 12, 2024 13:35
…23988)

<!--
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 fixes the style of footer buttons in the new-network component so
they are readable in both light and dark mode.

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

## **Related issues**

Fixes:
[23725](#23725)

## **Manual testing steps**

1. Turn on dark mode setting in extension
2. Add a new network
3. Verify that "Got it" button text is black
4. Verify that "Learn to bridge" button text is blue
5. Verify that "Learn to bridge" button text is black on hover
6. Turn on light mode setting in extension
2. Add a new network
3. Verify that "Got it" button text is white
4. Verify that "Learn to bridge" button text is blue
5. Verify that "Learn to bridge" button text is white on hover

## **Screenshots/Recordings**

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

### **Before**

![image](https://github.com/MetaMask/metamask-extension/assets/100321200/365fc1e7-e874-4bd6-aa12-3de97f0396d3)


### **After**

<img width="341" alt="Screenshot 2024-04-11 at 10 59 23 AM"
src="https://github.com/MetaMask/metamask-extension/assets/100321200/63f45351-3601-4ee7-9c5b-f74cb3fe3f85">


## **Pre-merge author checklist**

- [X] I’ve followed [MetaMask 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.
…#23935)

This PR ensures that when a single account is disconnected from the Dapp
via connections. It shouldn't break the page and disconnects smoothle


## **Related issues**

Fixes: #23790

## **Manual testing steps**

1. Run extension with Multichain flag
2. Connect a single account to uniswap
3. Go to connections page, click on disconnect account.
4. It should disconnect the account

## **Screenshots/Recordings**


### **Before**





https://github.com/MetaMask/metamask-extension/assets/39872794/f4356be1-e6b8-4319-b2a0-be5439173fbe


### **After**

https://github.com/MetaMask/metamask-extension/assets/39872794/779ababe-d6a2-4f9a-aca8-d09284dd4aee



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

Caches subject metadata on the permission redirect screen, fixing the
problem where the dapp icon would disappear while redirecting. Also
fixes the centering on this icon as well as multiple other icons in the
app.

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


## **Manual testing steps**

1. Connect to any dapp
2. Notice the difference in the redirection screen

## **Screenshots/Recordings**

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

### **Before**


https://github.com/MetaMask/metamask-extension/assets/1561200/5b7a3ccc-47a8-4f95-932b-f544e998f331

### **After**


https://github.com/MetaMask/metamask-extension/assets/1561200/dc331711-388b-4d53-a869-e89618742119
<!--
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 checks for snap name localization to the snaps localization
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/23796?quickstart=1)

## **Related issues**

Fixes: MetaMask/MetaMask-planning#1653

## **Manual testing steps**

1. Run this as a single test locally.

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

<!--
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?
-->
Create E2E test for UI links
## **Related issues**

Fixes: #22425

## **Manual testing steps**

1. This is an automated E2E test

## **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 Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [x] 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.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

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

After importing an erc20 token, the popup message was not rendering the
checkmark icon.

The icon is from font-awesome, and their CSS works fine. But when we add
`@include design-system.H3`, it overrode the font-family, breaking the
icon.

Fixed by setting font size directly rather than bringing the whole H3.

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

## **Related issues**


## **Manual testing steps**

1. Import an erc20 token, either manually or via autodetection
2. Verify the green popup message has a checkmark icon

## **Screenshots/Recordings**

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

### **Before**

<img width="349" alt="Screenshot 2024-04-12 at 10 58 57 AM"
src="https://github.com/MetaMask/metamask-extension/assets/3500406/14878f22-b355-4eb5-97c6-feb317d8775f">


### **After**

<img width="354" alt="Screenshot 2024-04-12 at 12 00 30 PM"
src="https://github.com/MetaMask/metamask-extension/assets/3500406/8bca68da-645c-44a1-b754-4e529070ae50">



## **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.
Update `github/codeql-action@v2` to v3 as v2 is deprecated.
Update `actions/checkout@v2` to v3 as v2 is deprecated.
… granted to ensure correct proxies are assigned (#23525)

## **Description**
When the "Selected networks for each site" toggle is enabled, the wallet
API should use an origin-specific chain for all interactions. However
this doesn't work correctly if the connection status has changed since
the last refresh. If you grant permissions to a site or revoke them
(i.e. connect to or disconnect from a site), the site does not work as
expected until after the site is refreshed.

**Expected behavior**
The wallet API should always use the dapp-selected chain for sites with
permissions, and should use the globally-selected chain for sites
without permissions. This should apply even if the permissions have
changed since the page loaded.

**Solution**

This PR introduces [changes made to
`@metamask/selected-network-controller`](https://github.com/MetaMask/core/blob/main/packages/selected-network-controller/CHANGELOG.md#changed)
to resolve the issue described above:
> Previously the SelectedNetworkController only constructed proxies for
domains that had permissions. Other domains have no associated proxy and
the getProviderAndBlockTracker method would throw an error. This was
problematic because we grab the network client for an origin a single
time when constructing an RPC pipeline for that origin in the MetaMask
extension. We don't re-create the RPC pipeline when permissions change.
That means that the pipeline is setup with the wrong network client and
cannot be updated. The following changes ensure seamlessly proxying
calls during sessions where a dapp connects/disconnects and provides a
path for clients to prune inactive proxies.

This domainProxyMap param now passed into `SelectedNetworkController`
allows the client to handle pruning inactive proxies while the
SelectedNetworkController handles adding entries - it can't handle
removal, as it doesn't know which connections are active.

The extension passes in an instance of a newly created `WeakStringMap`
class which allows for garbage collection of its data once no longer
referenced.

## **Related issues**

Fixes: #23509

## **Manual testing steps**

The problem presented itself in two scenarios: when granting site
permissions, and when revoking all site permissions.

**When granting permissions:**
- Enable the "Selected networks for each site" toggle
- Open a site with no permissions in one tab, and the fullscreen wallet
UI in another
- If the site was open already, hard-refresh before proceeding
- Call eth_requestAccounts on the site, asking for the eth_accounts
permissions
- Approve the request
- Call eth_chainId from the site, and see that it matches the wallet
selected chain
- Switch the selected chain in the fullscreen UI
- Call eth_chainId from the site, and see that it is still on the same
chain the wallet was connected to before switching

**When revoking permissions:**
- Redo all the same steps for **When granting permissions:**
- Open the browser-action popup, click on the three-vertical-dots menu,
click "Connected sites", then disconnect from the site
- Call eth_chainId from the site. See that the sites connected chain is
now the same as the "globally selected chain" in the wallet

## **Screenshots/Recordings**


### **Before**

This recording shows both reproduction use cases (granting permissions,
then revoking)


[queue-selected-chain-bug-2024-03-14_19.49.19.webm](https://github.com/MetaMask/metamask-extension/assets/2459287/092c0a9d-e734-4309-9455-d6444f7504ef)

### **After**


https://github.com/MetaMask/metamask-extension/assets/34557516/62145d32-493b-41a2-ba8e-a1545ef1286a


## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [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.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.
The `brfs` package was used to transform calls to `fs.readFile*` into
inlined files as strings during build/compilation. We no longer make use
of `fs.readFile*` in our code, so the dependency is no longer required.
While it doesn't cause issues to leave it, the package is slow as it
must parse the contents into an AST and then statically analyze the tree
looking for relevant calls to `fs.readFile*`. This overhead is unwanted,
so I've removed it from our build process.
In the previous logic, we were using activeTabOrigin to get the subject
MetaData to get the connected Dapp MetaData but it seems like there is
another bug because of which metaData is not being fetched correctly. As
a result, we are not able to get the connected Dapp Logo and connected
status properly. In this PR, we are relying on
getPermittedAccountsForCurrentTab to get the connected status and if the
connected dapp metaData is not defined, we will rely on global icon
rather than connected dapp icon

## **Related issues**

Fixes: #23792 

## **Manual testing steps**

1. Run extension with Multichain Flag and connect it to dapp
2. If the dapp shows connected status, then the connection page should
return the connected accounts
3. Test it with multiple Dapps

## **Screenshots/Recordings**


### **Before**
Refer to the issue

### **After**



https://github.com/MetaMask/metamask-extension/assets/39872794/4536a206-a4de-45e4-88ca-cdbaf92478bb




## **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.
This PR is to ensure that the permissions page renders list of all the
permissions with the current networks. For a few networks, we don't have
the rpcPrefs that was causing the siteKey nd the rpcPrefs to be
undefined.
This PR also makes sure that the defined background color is there for
the test networks that doesn't have a logo


## **Related issues**

Fixes: #23812 #23793 


## **Manual testing steps**

1. Connect an account on Uniswap
2. Open the popup
3. Open the three-dot menu and choose "All Permissions"
4. It should render the permission with the accounts

## **Screenshots/Recordings**


### **Before**


https://github.com/MetaMask/metamask-extension/assets/39872794/4fc1e04c-fde3-4905-a8b8-b16c75d9f7d1



### **After**


https://github.com/MetaMask/metamask-extension/assets/39872794/c56a60cb-24e6-4857-ac29-2539bb0f6645



## **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.
…24023)

This PR is to fix the UI bugs in the wallet, permissions and connections
screen to keep it in sync with the Updated designs

## **Description**
Following changes are updated:
1. Description of the product tour for global menu [Note: This product
tour will be removed]
2. Remove Connected dApp shown on Account List Item
3. Remove Connect account action in Select Account Modal

## **Related issues**

Fixes: #23858 



## **Manual testing steps**

This PR solves Part of the linked issue, rest of them are already
resolved via different other PRs, Linking them in the list:
1. Description of the product tour for global menu - Modified in this PR
2. Connected sites and All Permissions in Global menu -
[23789](#23789)
3. Remove Connected dApp shown on Account List Item - Modified in this
PR
4. Connected Account Toast should only be displayed on Wallet screen -
[23733](#23733)
5. Remove Connect account action in Select Account Modal - Modified in
this PR
6. Network switching within Extension - This isssue doesn't exist
anymore.
7. Button in Network switch Modal - Was related to Design System, fixed.

## **Screenshots/Recordings**


### **Before**

Please refer to the issue
### **After**
1. This Product tour will be removed in a separate PR
2.  No dapp logo on account list item even when it's connected
![Screenshot 2024-04-16 at 3 02
46 PM](https://github.com/MetaMask/metamask-extension/assets/39872794/01b443c4-cc84-43c2-84a9-da012935def5)
3. No connect button in account list item menu


![Screenshot 2024-04-16 at 3 03
23 PM](https://github.com/MetaMask/metamask-extension/assets/39872794/71b902af-00f7-4c09-9fa9-aefc37f7a3f1)

## **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: David Walsh <davidwalsh83@gmail.com>
## **Description**

The "Developer Options" setting page will provide developers with
additional controls and customization to assist with development and
testing. This feature will enable developers to reset app states easily,
toggle certain features on/off, and update configurations without
needing to reinstall the app, accelerating developer velocity.

To enable, add `ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true` in .metamaskrc

Developer Options Supported:
- Reset Announcements/Notifications for What's New modal
- Reset Onboarding states and redirects to second onboarding page


## **Related issues**

Fixes: #23592
Blocked By: MetaMask/core#4088

## **Manual testing steps**

1. `yarn install` to install the latest announcement-controller changes
2. go to `.metamaskrc`
3. paste `ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true`
4. `yarn start`

Test using test-dapp
1. open test-dapp
2. test with PPOM buttons

---

1. See
chrome-extension://hbljfohiafgaaaabejngpgolnboohpaf/home.html#settings/developer-options

## **Screenshots/Recordings**

#### New UI

<img width="480" alt="Screenshot 2023-12-21 at 2 33 45 PM"
src="https://github.com/MetaMask/metamask-extension/assets/20778143/6d6ebd6c-8564-4d4e-8dcf-d9197ad11e6b">

![Screenshot 2023-12-22 at 1 58
28 PM](https://github.com/MetaMask/metamask-extension/assets/20778143/cfec8e2e-5cf8-43ed-9096-af22901e4bd5)

![Screenshot 2023-12-22 at 1 59
40 PM](https://github.com/MetaMask/metamask-extension/assets/20778143/70a11c03-735c-4f98-93e4-d8532c5aaea4)

#### Announcements 

![Screenshot 2024-03-17 at 8 13
41 PM](https://github.com/MetaMask/metamask-extension/assets/20778143/be91edfa-ade3-4a37-b628-3c8c62b0d27c)

#### Onboarding

![Screenshot 2024-03-17 at 8 13
56 PM](https://github.com/MetaMask/metamask-extension/assets/20778143/ae36304a-db40-4a7a-bbf2-e979167ecf4c)


## **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 clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] 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.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

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

## **Description**

Adds custodian logo to the top bar, at the left of the address and also
in the accounts list:

![Screenshot 2024-04-09 at 15 12
26](https://github.com/MetaMask/metamask-extension/assets/1125631/c7edac43-ba34-41ca-935c-cbf37aedd1d6)
![Screenshot 2024-04-09 at 15 09
26](https://github.com/MetaMask/metamask-extension/assets/1125631/5a65d301-8954-4b7b-a1ad-a2ab1cfca386)

## **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.
…naming (#24053)

## **Description**
This PR includes a few small updates:
- Updates UI / content for the Smart Transactions Opt In modal
- Renaming to `Smart Transactions`
- Small refactoring

## **Related issues**

Fixes:

## **Manual testing steps**
1. Install the extension
2. See the updated Smart Transactions Opt In Modal


## **Screenshots/Recordings**

Smart Transactions Opt In Modal:

![image](https://github.com/MetaMask/metamask-extension/assets/80175477/ffa978b6-8cde-4cad-be70-1242b135b8f9)


### **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.
…nents (#23933)

## **Description**

Improves performance in the account list and "account connection"
components by no longer leveraging `getAddressConnectedSubjectMap`. The
selector in question is very computationally expensive to use and thus
were causing performance problems for users with many accounts and many
connected sites. This PR proposes using
`getPermittedAccountsForCurrentTab` where possible and also introduces a
memoized selector `isAccountConnectedToCurrentTab` that performantly can
check for a given address.

From local testing this seems to improve the experience.

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

## **Related issues**

Fixes #23913

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
## **Description**

Deprecates Mumbai and linea goerli test networks.
Users should see a deprecation warning when switching to those networks.
Linea goerli is removed from the default network list.

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

## **Related issues**

ticket: https://consensyssoftware.atlassian.net/browse/MMASSETS-183
patch for controller-utils:
https://github.com/MetaMask/metamask-extension/pull/23727/files

## **Manual testing steps**

1. Go to home page
2. Click on network selector, You should not see Linea testnet in the
list.
3. Add Mumbai network to metamask
4. You should see deprecation warning

## **Screenshots/Recordings**

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

### **Before**
Linea goerli appears in the list of default networks

<img width="1798" alt="Screenshot 2024-03-26 at 16 17 41"
src="https://github.com/MetaMask/metamask-extension/assets/10994169/d82e3cba-4c6b-4546-9612-9dabf0b32b5b">

### **After**
In this video initially the user is on Linea goerli (i am on develop
branch), the user makes a few transactions on linea goerli,
then i switch to this branch so the migration runs, and notice that the
user has switeched to linea-sepolia.
Linea goerli is removed from the default networks tab.
When the user adds linea-goerli using chainlist, he sees the deprecation
warning and his transactions.


https://github.com/MetaMask/metamask-extension/assets/10994169/3ffd6a63-6bb0-4ea3-85ab-c31b8317cfd6

This short video shows the deprecation warning when we switch to Mumbai
network


https://github.com/MetaMask/metamask-extension/assets/10994169/496a9433-0547-4475-8320-39b1c5d01e2e

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

Problem: Users reporting missing fiat prices for some erc20 tokens, even
when price setting is on:

<img width="357" alt="Screenshot 2024-03-14 at 2 35 41 PM"
src="https://github.com/MetaMask/metamask-extension/assets/3500406/711cfa40-7387-43df-9981-9ed52973b5b4">

Diagnosis:

(1) The `TokenRatesController` gets stopped when metamask is closed. But
it is not started again when metamask re-opens, preventing any future
token price updates.

(2) If you have metamask installed but you never open/unlock it (within
a browser session), the `TokenRatesController` is still polling in the
background every 3 minutes.

The fix for both is to start the controller in `triggerNetworkrequests`
instead of on construction.

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Restore a wallet where multiple accounts have erc20 tokens
2. Enable token autodetection
4. Visit the first account with tokens, verify their prices
5. Close metamask
6. Re-open metamask
7. Visit the second account
8. Verify its tokens have prices

## **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**
Bump snaps packages to latest and handle breaking changes.

Summary of changes in the snaps deps:
- Improve encryption performance by caching encryption keys
- Remove access to `on` and `removeListener` on the `ethereum` object
for Snaps
  - This functionality was already broken
- Fixed a problem where unencrypted state would not be deleted when
uninstalling a Snap
- Allow form state to be null when triggering `onUserInput`
- Fixed over-eager link validation being triggered on non-links
- Add derivation path for Nimiq
…23819)

Update `amannn/action-semantic-pull-request@v5.2.0` to v5.4.0 as v5.2.0
is deprecated.
…23855)

## **Description**

- New  definition added to labelling guidelines: `regression-develop`.
- Same PR on Mobile repo:
MetaMask/metamask-mobile#9142

## **Related issues**

- Fixes: None

## **Manual testing steps**

- None

## **Screenshots/Recordings**

- Preview available here:
https://github.com/MetaMask/metamask-extension/blob/08c910cf750017d0bf586a28578dbfad8d6599c1/.github/guidelines/LABELING_GUIDELINES.md

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask 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 confirmation to remove a snap that has accounts present in the
keyring, requires that the user type the snap name to confirm removal.
However, the user can just copy and paste the name of the snap being
removed. This PR disables the ability to paste the name.

## **Related issues**

Fixes:
[21445](#21445)

## **Manual testing steps**

1. Create a new snap account
2. Go to settings and click on snap
3. Click on the snap and then remove snap
4. Click continue on the modal
5. Try to copy and paste the snap name in the input.
6. See that the input remains empty.

## **Screenshots/Recordings**

### **Before**


### **After**

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask 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: Daniel Rocha <daniel.rocha@consensys.net>
## **Description**

Creates a GH action to automatically notify MMI team members in order to
have immediate visibility of what’s to come and test/review.

Meaning, it will automatically notify us to our extension slack channel,
when a PR with the "team-mmi" tag is merged to develop.

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

---------

Co-authored-by: David Murdoch <187813+davidmurdoch@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
## **Description**
We should update content for:

when ppom returns warning as response

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

## **Related issues**

Fixes:
[#1758](https://github.com/MetaMask/MetaMask-planning/issues/1758)

## **Manual testing steps**



1. Add this custom network: https://base.drpc.org with chainId 8453
2. Trigger a transaction from the test dapp -- see error
3. For warning, you can edit the code to return a warning alert response
and see the warning.

## **Screenshots/Recordings**

### **Before**

<img width="353" alt="Screenshot 2024-04-15 at 22 37 08"
src="https://github.com/MetaMask/metamask-extension/assets/44811/2572b1a5-233d-4e7e-83c3-5ea92faef362">


### **After**

<img width="337" alt="Screenshot 2024-04-15 at 22 36 21"
src="https://github.com/MetaMask/metamask-extension/assets/44811/1e4ec760-3714-4a91-9e5b-e39784887354">


## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask 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.
@metamaskbot
Copy link
Collaborator

Builds ready [d181619]
Page Load Metrics (864 ± 584 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint641921043416
domContentLoaded9412194
load5328548641216584
domInteractive9412194
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@georgewrmarshall
Copy link
Contributor

georgewrmarshall commented Apr 25, 2024

🟢 Approval from @MetaMask/design-system team

@danjm danjm changed the base branch from master to Version-v11.15.0 April 26, 2024 19:03
Base automatically changed from Version-v11.15.0 to master April 30, 2024 19:53
@plasmacorral
Copy link
Contributor

🟢 Approval from Accounts team

@adonesky1
Copy link
Contributor

🟢 Approval for Wallet API Platform Team

…)) (#24329)

## **Description**

This is a cherry-pick of #24311 for v11.16.0

This version of phishing-controller includes the changes to Stalelist
update interval to 30 days and the hotlist update interval to 5 mins.

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask 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: Kanthesha Devaramane <kanthesha.devaramane@consensys.net>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Copy link

socket-security bot commented May 7, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@contentful/rich-text-html-renderer@16.3.5 None 0 133 kB whydah-gally
npm/@contentful/rich-text-types@16.3.5 None 0 146 kB whydah-gally
npm/@metamask/announcement-controller@6.1.0 None 0 77.4 kB metamaskbot
npm/@metamask/queued-request-controller@0.9.0 None +1 192 kB metamaskbot
npm/@metamask/selected-network-controller@12.0.1 None +1 187 kB metamaskbot
npm/@metamask/snaps-controllers@8.1.0 None 0 1.27 MB metamaskbot
npm/@metamask/snaps-execution-environments@6.1.0 None 0 5.55 MB metamaskbot
npm/@metamask/snaps-rpc-methods@8.1.0 None 0 892 kB metamaskbot
npm/contentful-resolve-response@1.8.1 None 0 20.1 kB whydah-gally
npm/contentful-sdk-core@8.1.2 None 0 66.2 kB contentful-ecosystem
npm/contentful@10.9.3 environment, eval, filesystem, network +1 5.35 MB contentful-ecosystem
npm/fast-copy@2.1.7 None 0 119 kB planttheidea
npm/merge-source-map@1.1.0 None 0 6.58 kB keik
npm/p-throttle@4.1.1 None 0 8.38 kB sindresorhus
npm/web3-stream-provider@5.0.0 None 0 4.92 kB lgbot

🚮 Removed packages: npm/@metamask/announcement-controller@5.0.2, npm/@metamask/network-controller@18.0.1, npm/@metamask/queued-request-controller@0.6.1, npm/@metamask/selected-network-controller@9.0.0, npm/@metamask/snaps-execution-environments@5.0.4, npm/array-from@2.1.1, npm/brfs@2.0.2, npm/buffer-equal@0.0.1, npm/dash-ast@2.0.1, npm/es6-map@0.1.5, npm/es6-set@0.1.6, npm/estree-is-function@1.0.0, npm/merge-source-map@1.0.4, npm/quote-stream@1.0.2, npm/scope-analyzer@2.1.2, npm/shallow-copy@0.0.1, npm/static-eval@2.1.1, npm/static-module@3.0.4, npm/web3-stream-provider@4.0.1

View full report↗︎

Copy link

socket-security bot commented May 7, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Network access npm/contentful@10.9.3
Network access npm/contentful@10.9.3

View full report↗︎

Next steps

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/contentful@10.9.3

@metamaskbot metamaskbot mentioned this pull request May 7, 2024
7 tasks
@danjm
Copy link
Contributor

danjm commented May 8, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@danjm
Copy link
Contributor

danjm commented May 9, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@sleepytanya
Copy link
Contributor

🟢 Approval from Confirmations team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-11.16.0 Issue or pull request that will be included in release 11.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet