Repository: MetaMask/metamask-mobile
Pull request #15477: chore: Bump Snaps packages
Author: login: FrederikBolding
Labels: name: INVALID-PR-TEMPLATE
description: PR's body doesn't match template
name: team-snaps-platform-deprecated
description: DEPRECATED: please use "team-core-platform" instead (or "team-new-networks" for Solana snap issues)
name: skip-sonar-cloud
description: Only used for bypassing sonar cloud when failures are not relevant to the changes.
name: release-7.48.0
description: Issue or pull request that will be included in release 7.48.0
Created: 2025-05-20T09:05:43Z | Merged: 2025-05-21T13:09:42Z

<!--
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 bumps Snaps packages to the latest versions. Notable changes are:

- Support for `wallet_switchEthereumChain` inside Snaps.
   - Like with websites, we want to support a custom network per Snap rather than relying on the globally selected network. For Snaps, the permission for the network to switch to is automatically granted.
- Support for SIP-31 `onClientRequest` handler.
- New `showTestnets` property in `snap_getPreferences`.
- Added `isMinimumPlatformVersion` action.

For `wallet_switchEthereumChain` we have applied the same changes as on the extension where `isAddNetworkFlow` was changed to be `autoApprove`. It seems like `autoApprove` was already attempted to be used.

## **Manual testing steps**

### `wallet_switchEthereumChain`

1. Go to [`test-snaps`](https://metamask.github.io/snaps/test-snaps/latest/)
2. Install the Ethereum Provider Example Snap.
3. Switch the chain ID using the `test-snaps` selector for the Ethereum Provider example.
4. Click "Get version".
5. The Snap should now use the new network, without any permission requests, and the appropriate chain ID should be shown.



Diff:
diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts
index 835653bc70d3..16f47621cd81 100644
--- a/app/core/Engine/Engine.ts
+++ b/app/core/Engine/Engine.ts
@@ -789,6 +789,7 @@ export class Engine {
           useNftDetection,
           displayNftMedia,
           isMultiAccountBalancesEnabled,
+          showTestNetworks,
         } = this.getPreferences();
         const locale = I18n.locale;
         return {
@@ -802,6 +803,7 @@ export class Engine {
           displayNftMedia,
           useNftDetection,
           useExternalPricingData: true,
+          showTestnets: showTestNetworks,
         };
       },
     };
@@ -1862,6 +1864,7 @@ export class Engine {
       useNftDetection,
       displayNftMedia,
       isMultiAccountBalancesEnabled,
+      showTestNetworks,
     } = this.context.PreferencesController.state;
 
     return {
@@ -1872,6 +1875,7 @@ export class Engine {
       useNftDetection,
       displayNftMedia,
       isMultiAccountBalancesEnabled,
+      showTestNetworks,
     };
   };
 
diff --git a/app/core/Engine/controllers/snaps/snap-controller-init.test.ts b/app/core/Engine/controllers/snaps/snap-controller-init.test.ts
index 56be3d29852c..874c7193d53c 100644
--- a/app/core/Engine/controllers/snaps/snap-controller-init.test.ts
+++ b/app/core/Engine/controllers/snaps/snap-controller-init.test.ts
@@ -64,6 +64,7 @@ describe('SnapControllerInit', () => {
         allowLocalSnaps: false,
         disableSnapInstallation: true,
         requireAllowlist: true,
+        useCaip25Permission: true,
       },
       getFeatureFlags: expect.any(Function),
       getMnemonicSeed: expect.any(Function),
diff --git a/app/core/Engine/controllers/snaps/snap-controller-init.ts b/app/core/Engine/controllers/snaps/snap-controller-init.ts
index 5078ef7da902..98915757fc5e 100644
--- a/app/core/Engine/controllers/snaps/snap-controller-init.ts
+++ b/app/core/Engine/controllers/snaps/snap-controller-init.ts
@@ -102,6 +102,7 @@ export const snapControllerInit: ControllerInitFunction<
       allowLocalSnaps,
       disableSnapInstallation,
       requireAllowlist,
+      useCaip25Permission: true,
     },
 
     // @ts-expect-error: `encryptorFactory` is not compatible with the expected
diff --git a/app/core/Engine/messengers/snaps/snap-controller-messenger.ts b/app/core/Engine/messengers/snaps/snap-controller-messenger.ts
index 2dbeab6f9874..b367e6002b8e 100644
--- a/app/core/Engine/messengers/snaps/snap-controller-messenger.ts
+++ b/app/core/Engine/messengers/snaps/snap-controller-messenger.ts
@@ -38,6 +38,8 @@ import {
   KeyringControllerLockEvent,
 } from '@metamask/keyring-controller';
 import { PreferencesControllerGetStateAction } from '@metamask/preferences-controller';
+import { NetworkControllerGetNetworkClientByIdAction } from '@metamask/network-controller';
+import { SelectedNetworkControllerGetNetworkClientIdForDomainAction } from '@metamask/selected-network-controller';
 
 type Actions =
   | GetEndowments
@@ -64,7 +66,9 @@ type Actions =
   | Update
   | ResolveVersion
   | CreateInterface
-  | GetInterface;
+  | GetInterface
+  | NetworkControllerGetNetworkClientByIdAction
+  | SelectedNetworkControllerGetNetworkClientIdForDomainAction;
 
 type Events =
   | ErrorMessageEvent
@@ -120,6 +124,8 @@ export function getSnapControllerMessenger(
       'SnapsRegistry:resolveVersion',
       `SnapInterfaceController:createInterface`,
       `SnapInterfaceController:getInterface`,
+      'NetworkController:getNetworkClientById',
+      'SelectedNetworkController:getNetworkClientIdForDomain',
     ],
   });
 }
diff --git a/app/core/Engine/types.ts b/app/core/Engine/types.ts
index 2d2bd500ab61..c6e524047730 100644
--- a/app/core/Engine/types.ts
+++ b/app/core/Engine/types.ts
@@ -146,8 +146,6 @@ import {
 ///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps)
 import {
   SnapController,
-  AllowedActions as SnapsAllowedActions,
-  AllowedEvents as SnapsAllowedEvents,
   ExecutionService,
   PersistedSnapControllerState,
   SnapControllerEvents,
@@ -298,13 +296,11 @@ type SnapsGlobalActions =
   | SnapsRegistryActions
   | SubjectMetadataControllerActions
   | PhishingControllerActions
-  | SnapsAllowedActions;
 type SnapsGlobalEvents =
   | SnapControllerEvents
   | SnapsRegistryEvents
   | SubjectMetadataControllerEvents
   | PhishingControllerEvents
-  | SnapsAllowedEvents;
 ///: END:ONLY_INCLUDE_IF
 
 type GlobalActions =
diff --git a/app/core/RPCMethods/lib/ethereum-chain-utils.js b/app/core/RPCMethods/lib/ethereum-chain-utils.js
index 9154470c2016..c352101eb8c4 100644
--- a/app/core/RPCMethods/lib/ethereum-chain-utils.js
+++ b/app/core/RPCMethods/lib/ethereum-chain-utils.js
@@ -215,7 +215,7 @@ export function findExistingNetwork(chainId, networkConfigurations) {
  * @param {Function} params.requestUserApproval - The callback to trigger user approval flow.
  * @param {object} params.analytics - Analytics parameters to be passed when tracking event via `MetaMetrics`.
  * @param {string} params.origin - The origin sending this request.
- * @param {boolean} params.isAddNetworkFlow - Variable to check if its add flow.
+ * @param {boolean} params.autoApprove - Variable to check if the switch should be auto approved.
  * @param {object} params.hooks - Method hooks passed to the method implementation.
  * @returns a null response on success or an error if user rejects an approval when autoApprove is false or on unexpected errors.
  */
@@ -225,7 +225,7 @@ export async function switchToNetwork({
   requestUserApproval,
   analytics,
   origin,
-  isAddNetworkFlow = false,
+  autoApprove = false,
   hooks,
 }) {
   const {
@@ -263,7 +263,7 @@ export async function switchToNetwork({
     await requestPermittedChainsPermissionIncrementalForOrigin({
       origin,
       chainId,
-      autoApprove: isAddNetworkFlow,
+      autoApprove,
     });
   }
 
@@ -271,10 +271,10 @@ export async function switchToNetwork({
     chainPermissionsFeatureEnabled &&
     (!ethChainIds || !ethChainIds.includes(chainId));
 
-  const requestModalType = isAddNetworkFlow ? 'new' : 'switch';
+  const requestModalType = autoApprove ? 'new' : 'switch';
 
   const shouldShowRequestModal =
-    (!isAddNetworkFlow && shouldGrantPermissions) ||
+    (!autoApprove && shouldGrantPermissions) ||
     !chainPermissionsFeatureEnabled;
 
   const requestData = {
@@ -322,9 +322,9 @@ export async function switchToNetwork({
     await requestPermittedChainsPermissionIncrementalForOrigin({
       origin,
       chainId,
-      autoApprove: isAddNetworkFlow,
+      autoApprove,
     });
-  } else if (hasApprovalRequestsForOrigin?.() && !isAddNetworkFlow) {
+  } else if (hasApprovalRequestsForOrigin?.() && !autoApprove) {
     await requestUserApproval({
       origin,
       type: ApprovalType.SwitchEthereumChain,
diff --git a/app/core/RPCMethods/lib/ethereum-chain-utils.test.ts b/app/core/RPCMethods/lib/ethereum-chain-utils.test.ts
index 4f1ddbb195ee..0aa350dd7338 100644
--- a/app/core/RPCMethods/lib/ethereum-chain-utils.test.ts
+++ b/app/core/RPCMethods/lib/ethereum-chain-utils.test.ts
@@ -65,7 +65,7 @@ describe('switchToNetwork', () => {
       test: 'test',
     };
     const origin = 'test';
-    const isAddNetworkFlow = false;
+    const autoApprove = false;
 
     await switchToNetwork({
       network: [networkClientId, network],
@@ -73,7 +73,7 @@ describe('switchToNetwork', () => {
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
+      autoApprove,
       hooks: mockHooks,
     });
 
diff --git a/app/core/RPCMethods/wallet_addEthereumChain.js b/app/core/RPCMethods/wallet_addEthereumChain.js
index 120a0256d52c..c92e37c588a4 100644
--- a/app/core/RPCMethods/wallet_addEthereumChain.js
+++ b/app/core/RPCMethods/wallet_addEthereumChain.js
@@ -75,7 +75,7 @@ export const wallet_addEthereumChain = async ({
     ticker,
   } = params;
 
-  const switchToNetworkAndMetrics = async (network, isAddNetworkFlow) => {
+  const switchToNetworkAndMetrics = async (network) => {
     const { networkClientId } =
       network.rpcEndpoints[network.defaultRpcEndpointIndex];
 
@@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
       hooks,
     });
@@ -152,7 +151,6 @@ export const wallet_addEthereumChain = async ({
         rpcEndpoints: rpcResult.updatedArray,
         defaultRpcEndpointIndex: rpcResult.index,
       },
-      false,
     );
 
     res.result = null;
@@ -282,7 +280,7 @@ export const wallet_addEthereumChain = async ({
         .build(),
     );
   }
-  switchToNetworkAndMetrics(newNetworkConfiguration, true);
+  switchToNetworkAndMetrics(newNetworkConfiguration);
 
   res.result = null;
 };
diff --git a/app/core/RPCMethods/wallet_switchEthereumChain.js b/app/core/RPCMethods/wallet_switchEthereumChain.js
index 42e9bb9ceae8..ef483e35c61b 100644
--- a/app/core/RPCMethods/wallet_switchEthereumChain.js
+++ b/app/core/RPCMethods/wallet_switchEthereumChain.js
@@ -8,6 +8,7 @@ import {
   switchToNetwork,
 } from './lib/ethereum-chain-utils';
 import { MESSAGE_TYPE } from '../createTracingMiddleware';
+import { isSnapId } from '@metamask/snaps-utils';
 
 /**
  * Switch chain implementation to be used in JsonRpcEngine middleware.
@@ -92,7 +93,7 @@ export const wallet_switchEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow: false,
+      autoApprove: isSnapId(origin),
       hooks: {
         toNetworkConfiguration,
         fromNetworkConfiguration,
diff --git a/app/core/Snaps/SnapBridge.ts b/app/core/Snaps/SnapBridge.ts
index 3e5cb8cadab3..f249e93bd292 100644
--- a/app/core/Snaps/SnapBridge.ts
+++ b/app/core/Snaps/SnapBridge.ts
@@ -24,6 +24,8 @@ import ObjectMultiplex from '@metamask/object-multiplex';
 import createFilterMiddleware from '@metamask/eth-json-rpc-filters';
 import createSubscriptionManager from '@metamask/eth-json-rpc-filters/subscriptionManager';
 import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware';
+import { createOriginMiddleware } from '../../util/middlewares';
+import { createSelectedNetworkMiddleware } from '@metamask/selected-network-controller';
 const pump = require('pump');
 
 interface ISnapBridgeProps {
@@ -152,6 +154,9 @@ export default class SnapBridge {
       engine.emit('notification', message),
     );
 
+    engine.push(createOriginMiddleware({ origin: this.snapId }));
+    engine.push(createSelectedNetworkMiddleware(Engine.controllerMessenger));
+
     // Filter and subscription polyfills
     engine.push(filterMiddleware);
     engine.push(subscriptionManager.middleware);
diff --git a/app/core/WalletConnect/wc-utils.ts b/app/core/WalletConnect/wc-utils.ts
index ab8f5846499c..f7c7b545856b 100644
--- a/app/core/WalletConnect/wc-utils.ts
+++ b/app/core/WalletConnect/wc-utils.ts
@@ -316,7 +316,6 @@ export const checkWCPermissions = async ({
         requestUserApproval: onRequestUserApproval(origin),
         analytics: {},
         origin,
-        isAddNetworkFlow: false,
         hooks: getRpcMethodMiddlewareHooks(origin),
       });
     } catch (error) {
diff --git a/app/util/permissions/index.test.ts b/app/util/permissions/index.test.ts
index 073624dd93e8..757cbcbe908d 100644
--- a/app/util/permissions/index.test.ts
+++ b/app/util/permissions/index.test.ts
@@ -43,20 +43,6 @@ describe('Permission Utils', () => {
   });
 
   describe('requestPermittedChainsPermissionIncremental', () => {
-    it('throws if the origin is snapId', async () => {
-      await expect(() =>
-        requestPermittedChainsPermissionIncremental({
-          origin: 'npm:snap',
-          chainId: '0x1',
-          autoApprove: false,
-        }),
-      ).rejects.toThrow(
-        new Error(
-          'Cannot request permittedChains permission for Snaps with origin "npm:snap"',
-        ),
-      );
-    });
-
     it('requests permittedChains approval if autoApprove: false', async () => {
       const subjectPermissions: Partial<
         SubjectPermissions<
@@ -419,6 +405,9 @@ describe('Permission Utils', () => {
                 value: {
                   requiredScopes: {},
                   optionalScopes: {
+                    'eip155:100': {
+                      accounts: [],
+                    },
                     'wallet:eip155': {
                       accounts: [],
                     },
@@ -433,7 +422,7 @@ describe('Permission Utils', () => {
       );
     });
 
-    it('returns approval from the PermissionsController for only eth_accounts when both eth_accounts and permittedChains are specified in params and origin is snapId', async () => {
+    it('returns approval from the PermissionsController for eth_accounts and permittedChains when both eth_accounts and permittedChains are specified in params and origin is snapId', async () => {
       const permissions = await getCaip25PermissionFromLegacyPermissions(
         'npm:snap',
         {
@@ -465,6 +454,11 @@ describe('Permission Utils', () => {
                 value: {
                   requiredScopes: {},
                   optionalScopes: {
+                    'eip155:100': {
+                      accounts: [
+                        'eip155:100:0x0000000000000000000000000000000000000001'
+                      ],
+                    },
                     'wallet:eip155': {
                       accounts: [
                         'wallet:eip155:0x0000000000000000000000000000000000000001',
@@ -533,7 +527,7 @@ describe('Permission Utils', () => {
       );
     });
 
-    it('returns CAIP-25 approval with approved accounts for the `wallet:eip155` scope (and no approved chainIds) with isMultichainOrigin: false if origin is snapId', async () => {
+    it('returns CAIP-25 approval with approved accounts for the `wallet:eip155` scope with isMultichainOrigin: false if origin is snapId', async () => {
       const origin = 'npm:snap';
 
       const permissions = await getCaip25PermissionFromLegacyPermissions(
@@ -567,6 +561,12 @@ describe('Permission Utils', () => {
                 value: {
                   requiredScopes: {},
                   optionalScopes: {
+                    'eip155:1': {
+                      accounts: ['eip155:1:0xdeadbeef'],
+                    },
+                    'eip155:5': {
+                      accounts: ['eip155:5:0xdeadbeef'],
+                    },
                     'wallet:eip155': {
                       accounts: ['wallet:eip155:0xdeadbeef'],
                     },
diff --git a/app/util/permissions/index.ts b/app/util/permissions/index.ts
index 33e6bb63351d..933fe8b19e37 100644
--- a/app/util/permissions/index.ts
+++ b/app/util/permissions/index.ts
@@ -3,7 +3,6 @@ import Engine from '../../core/Engine';
 import { PermissionKeys } from '../../core/Permissions/specifications';
 import { CaveatTypes } from '../../core/Permissions/constants';
 import { pick } from 'lodash';
-import { isSnapId } from '@metamask/snaps-utils';
 import {
   Caip25CaveatType,
   Caip25CaveatValue,
@@ -28,12 +27,12 @@ const approvalLog = createProjectLogger('approval-utils');
  * Requests user approval for the CAIP-25 permission for the specified origin
  * and returns a granted permissions object.
  *
- * @param {string} origin - The origin to request approval for.
+ * @param {string} _origin - The origin to request approval for.
  * @param requestedPermissions - The legacy permissions to request approval for.
  * @returns the approved permissions object.
  */
 export const getCaip25PermissionFromLegacyPermissions = (
-  origin: string,
+  _origin: string,
   requestedPermissions?: {
     [PermissionKeys.eth_accounts]?: {
       caveats?: {
@@ -62,10 +61,6 @@ export const getCaip25PermissionFromLegacyPermissions = (
     permissions[PermissionKeys.permittedChains] = {};
   }
 
-  if (isSnapId(origin)) {
-    delete permissions[PermissionKeys.permittedChains];
-  }
-
   const requestedAccounts =
     permissions[PermissionKeys.eth_accounts]?.caveats?.find(
       (caveat) => caveat.type === CaveatTypes.restrictReturnedAccounts,
@@ -89,7 +84,7 @@ export const getCaip25PermissionFromLegacyPermissions = (
 
   const caveatValueWithChains = setPermittedEthChainIds(
     newCaveatValue,
-    isSnapId(origin) ? [] : requestedChains,
+    requestedChains,
   );
 
   const caveatValueWithAccountsAndChains = setEthAccounts(
@@ -132,12 +127,6 @@ export const requestPermittedChainsPermissionIncremental = async ({
   chainId: Hex;
   autoApprove: boolean;
 }) => {
-  if (isSnapId(origin)) {
-    throw new Error(
-      `Cannot request permittedChains permission for Snaps with origin "${origin}"`,
-    );
-  }
-
   const { PermissionController } = Engine.context;
   const caveatValueWithChains = setPermittedEthChainIds(
     {
diff --git a/package.json b/package.json
index fde64f7dcf90..e9b5e8c101c7 100644
--- a/package.json
+++ b/package.json
@@ -217,15 +217,15 @@
     "@metamask/rpc-errors": "^7.0.2",
     "@metamask/scure-bip39": "^2.1.0",
     "@metamask/sdk-communication-layer": "0.29.0-wallet",
-    "@metamask/selected-network-controller": "^22.0.0",
+    "@metamask/selected-network-controller": "^22.1.0",
     "@metamask/signature-controller": "^28.0.0",
     "@metamask/slip44": "^4.1.0",
     "@metamask/smart-transactions-controller": "^16.3.1",
-    "@metamask/snaps-controllers": "^12.0.1",
-    "@metamask/snaps-execution-environments": "^8.0.1",
-    "@metamask/snaps-rpc-methods": "^12.2.0",
-    "@metamask/snaps-sdk": "^6.23.0",
-    "@metamask/snaps-utils": "^9.2.2",
+    "@metamask/snaps-controllers": "^12.2.0",
+    "@metamask/snaps-execution-environments": "^8.1.0",
+    "@metamask/snaps-rpc-methods": "^12.3.0",
+    "@metamask/snaps-sdk": "^6.24.0",
+    "@metamask/snaps-utils": "^9.3.0",
     "@metamask/solana-wallet-snap": "^1.29.0",
     "@metamask/stake-sdk": "^1.0.0",
     "@metamask/swappable-obj-proxy": "^2.1.0",
diff --git a/yarn.lock b/yarn.lock
index 558b56d72421..acf98292aac1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5678,12 +5678,12 @@
     utf-8-validate "^5.0.2"
     uuid "^8.3.2"
 
-"@metamask/selected-network-controller@^22.0.0":
-  version "22.0.0"
-  resolved "https://registry.yarnpkg.com/@metamask/selected-network-controller/-/selected-network-controller-22.0.0.tgz#6b6490e2246cf07bad9400638acea28330d2bbf9"
-  integrity sha512-IxVHwzZO7CUsDptrlBKXepqZnZkNTuD9ckL9DTb41pCN53bTxxfNXukIvie3JROR6F4WEd2ijoSm2S/rWNNVRg==
+"@metamask/selected-network-controller@^22.1.0":
+  version "22.1.0"
+  resolved "https://registry.yarnpkg.com/@metamask/selected-network-controller/-/selected-network-controller-22.1.0.tgz#dfeba14bafbdba071e02857e2ef90f30e5ed1258"
+  integrity sha512-KKPjJPO8ewEJOT5GMiee9o0fJNoHOgRHdUvLff2Iu4xJyUpMpwbxi62sAGf/mNFC/75d0P5dGgOeaLFpLkrd3g==
   dependencies:
-    "@metamask/base-controller" "^8.0.0"
+    "@metamask/base-controller" "^8.0.1"
     "@metamask/json-rpc-engine" "^10.0.3"
     "@metamask/swappable-obj-proxy" "^2.3.0"
     "@metamask/utils" "^11.2.0"
@@ -5724,10 +5724,10 @@
     fast-json-patch "^3.1.0"
     lodash "^4.17.21"
 
-"@metamask/snaps-controllers@^12.0.1":
-  version "12.0.1"
-  resolved "https://registry.yarnpkg.com/@metamask/snaps-controllers/-/snaps-controllers-12.0.1.tgz#d62af5489ab9010233d66903f56c61f43a1820ed"
-  integrity sha512-gEJwRgimqXyPzvfACM5ZDBK1YBY2Gyt9i8VIzQ/OQ458O7B8cO4/0x8NdfNw2Ux2DTEgMiZKr2boeqGx2ubSkg==
+"@metamask/snaps-controllers@^12.2.0":
+  version "12.2.0"
+  resolved "https://registry.yarnpkg.com/@metamask/snaps-controllers/-/snaps-controllers-12.2.0.tgz#aabc81ff76bde3608509413c73b1574b13aef091"
+  integrity sha512-Vl20a5lvgeLAnT+p7CUrXhazObm8Td18TH0ppKgARiIeixR+RttxWovwmV5aQmqPf9Q4enyuhKzWmRtX2qKrDA==
   dependencies:
     "@metamask/approval-controller" "^7.1.3"
     "@metamask/base-controller" "^8.0.1"
@@ -5740,9 +5740,9 @@
     "@metamask/post-message-stream" "^10.0.0"
     "@metamask/rpc-errors" "^7.0.2"
     "@metamask/snaps-registry" "^3.2.3"
-    "@metamask/snaps-rpc-methods" "^12.2.0"
-    "@metamask/snaps-sdk" "^6.23.0"
-    "@metamask/snaps-utils" "^9.2.2"
+    "@metamask/snaps-rpc-methods" "^12.3.0"
+    "@metamask/snaps-sdk" "^6.24.0"
+    "@metamask/snaps-utils" "^9.3.0"
     "@metamask/utils" "^11.4.0"
     "@xstate/fsm" "^2.0.0"
     async-mutex "^0.5.0"
@@ -5758,18 +5758,18 @@
     semver "^7.5.4"
     tar-stream "^3.1.7"
 
-"@metamask/snaps-execution-environments@^8.0.1":
-  version "8.0.1"
-  resolved "https://registry.yarnpkg.com/@metamask/snaps-execution-environments/-/snaps-execution-environments-8.0.1.tgz#e1f6b2f82ce78eacc560264b497f061fccbb83ae"
-  integrity sha512-mixUO02zvt45SvSZev1IH4HRy7hwHK/gb/aq6yO72ev8gTHFDUBoVRnfzBTriDQFCgkM6tTfS+DVt9+CFCs1Ug==
+"@metamask/snaps-execution-environments@^8.1.0":
+  version "8.1.0"
+  resolved "https://registry.yarnpkg.com/@metamask/snaps-execution-environments/-/snaps-execution-environments-8.1.0.tgz#0410a220025e77170358b2d64925ef3240f53ab7"
+  integrity sha512-mzzZ//uNO4P/A2b7YDhXNnIvlQZXWO3hgbaTlKHrNldPpB3zgjrfFJnZBo7CCu2tE6cX4jd7F1vA63qRivq1ew==
   dependencies:
     "@metamask/json-rpc-engine" "^10.0.2"
     "@metamask/object-multiplex" "^2.1.0"
     "@metamask/post-message-stream" "^10.0.0"
     "@metamask/providers" "^22.1.0"
     "@metamask/rpc-errors" "^7.0.2"
-    "@metamask/snaps-sdk" "^6.23.0"
-    "@metamask/snaps-utils" "^9.2.2"
+    "@metamask/snaps-sdk" "^6.24.0"
+    "@metamask/snaps-utils" "^9.3.0"
     "@metamask/superstruct" "^3.2.1"
     "@metamask/utils" "^11.4.0"
     readable-stream "^3.6.2"
@@ -5784,25 +5784,25 @@
     "@noble/curves" "^1.2.0"
     "@noble/hashes" "^1.3.2"
 
-"@metamask/snaps-rpc-methods@^12.2.0":
-  version "12.2.0"
-  resolved "https://registry.yarnpkg.com/@metamask/snaps-rpc-methods/-/snaps-rpc-methods-12.2.0.tgz#7ba24f86fb19f01b9f0b3fe2fad04c59d40cd8e4"
-  integrity sha512-EjE0aBGDZBmlzLrI9CGvXU1dZPkyDsgJGovUBWxYFnD/CPizrbPmo+KCS7QBnN85uYRTUTS53oBovWB/MdI9wA==
+"@metamask/snaps-rpc-methods@^12.3.0":
+  version "12.3.0"
+  resolved "https://registry.yarnpkg.com/@metamask/snaps-rpc-methods/-/snaps-rpc-methods-12.3.0.tgz#fc3e4de536befe338edf6c44e00174df5956e9dd"
+  integrity sha512-qiWkeYudM0U9tBbuxDItAChTx0PFbKHiFIR5iWwzuRfbwuQo2ITgdZBZTiRrESlFbGpGkpTDfOPt+Bv79mdazA==
   dependencies:
     "@metamask/key-tree" "^10.1.1"
     "@metamask/permission-controller" "^11.0.6"
     "@metamask/rpc-errors" "^7.0.2"
-    "@metamask/snaps-sdk" "^6.23.0"
-    "@metamask/snaps-utils" "^9.2.2"
+    "@metamask/snaps-sdk" "^6.24.0"
+    "@metamask/snaps-utils" "^9.3.0"
     "@metamask/superstruct" "^3.2.1"
     "@metamask/utils" "^11.4.0"
     "@noble/hashes" "^1.7.1"
     luxon "^3.5.0"
 
-"@metamask/snaps-sdk@^6.22.0", "@metamask/snaps-sdk@^6.23.0":
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/@metamask/snaps-sdk/-/snaps-sdk-6.23.0.tgz#d61d4cbfda2c2e0aa66ee1c82e38f56d24b6b68f"
-  integrity sha512-V0uuomD5zfwsME3mklQezFWIttZwd843t39IBqcSbQqbsX08QJA6//wU54keh07pCyVvrdRtIR8w1Zqv8GqzUQ==
+"@metamask/snaps-sdk@^6.22.0", "@metamask/snaps-sdk@^6.24.0":
+  version "6.24.0"
+  resolved "https://registry.yarnpkg.com/@metamask/snaps-sdk/-/snaps-sdk-6.24.0.tgz#952b99463fa99d97e23f909ab535f408c75bc9a1"
+  integrity sha512-1MjfKt8fsKfNLs69xWD9XNtCFstth4mGvzkfXZdm37yZn8Hu4PHE56AFvTvTlYua3zRTuEHXn1PALDGnLs6jPw==
   dependencies:
     "@metamask/key-tree" "^10.1.1"
     "@metamask/providers" "^22.1.0"
@@ -5810,10 +5810,10 @@
     "@metamask/superstruct" "^3.2.1"
     "@metamask/utils" "^11.4.0"
 
-"@metamask/snaps-utils@^9.2.0", "@metamask/snaps-utils@^9.2.2":
-  version "9.2.2"
-  resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-9.2.2.tgz#ba78625bd4ff249f16cada74aae3841eac376ddc"
-  integrity sha512-j3las/qt3NMOrmaH8qN498JxzccIADhfDjZx2r1RERRsxT8mJL4vnWa+skvwWgp4FKVuwYNSgzLoHdWDXVIwaQ==
+"@metamask/snaps-utils@^9.2.0", "@metamask/snaps-utils@^9.3.0":
+  version "9.3.0"
+  resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-9.3.0.tgz#e0802f42288aa1559a50b9fe38595537ace693bc"
+  integrity sha512-lIKb9lhz6PMj1D/AVpdozToGGXz5EmnOA0mJ19mpJYkwUIn77Vh/AMWILqlYqRK2lfvy7QTegOBgawQVne9zsQ==
   dependencies:
     "@babel/core" "^7.23.2"
     "@babel/types" "^7.23.0"
@@ -5823,7 +5823,7 @@
     "@metamask/rpc-errors" "^7.0.2"
     "@metamask/slip44" "^4.1.0"
     "@metamask/snaps-registry" "^3.2.3"
-    "@metamask/snaps-sdk" "^6.23.0"
+    "@metamask/snaps-sdk" "^6.24.0"
     "@metamask/superstruct" "^3.2.1"
     "@metamask/utils" "^11.4.0"
     "@noble/hashes" "^1.7.1"


Reviews:
user: login: Mrtenz
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-21T08:17:24Z
user: login: Mrtenz
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-21T08:20:13Z
user: login: GuillaumeRx
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T09:23:53Z
user: login: ffmcgee725
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T09:46:31Z
user: login: FrederikBolding
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T09:47:22Z
user: login: ffmcgee725
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T09:48:22Z
user: login: FrederikBolding
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T09:50:37Z
user: login: Daniel-Cross
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T10:41:58Z
user: login: ffmcgee725
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T11:35:01Z
user: login: FrederikBolding
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T11:36:37Z
user: login: ffmcgee725
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T11:42:51Z
user: login: FrederikBolding
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T11:57:51Z
user: login: FrederikBolding
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-21T11:58:36Z
user: login: ffmcgee725
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-21T12:06:47Z
user: login: elribonazo
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T12:47:15Z
user: login: tommasini
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T12:49:00Z

Review comments:
diff_hunk: @@ -215,7 +215,7 @@ export function findExistingNetwork(chainId, networkConfigurations) {
  * @param {Function} params.requestUserApproval - The callback to trigger user approval flow.
  * @param {object} params.analytics - Analytics parameters to be passed when tracking event via `MetaMetrics`.
  * @param {string} params.origin - The origin sending this request.
- * @param {boolean} params.isAddNetworkFlow - Variable to check if its add flow.
+ * @param {boolean} params.autoApprove - Variable to check if the switc should be auto approved.
path: app/core/RPCMethods/lib/ethereum-chain-utils.js
user: login: Mrtenz
body: ```suggestion
 * @param {boolean} params.autoApprove - Variable to check if the switch should be auto approved.
```
created_at: 2025-05-21T08:16:15Z
author_association: MEMBER
diff_hunk: @@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
path: app/core/RPCMethods/wallet_addEthereumChain.js
user: login: ffmcgee725
body: ```
    const shouldAddOrUpdateNetwork =
      !existingNetwork ||
      rpcIndex !== existingNetwork.defaultRpcEndpointIndex ||
      (firstValidBlockExplorerUrl &&
        blockExplorerIndex !== existingNetwork.defaultBlockExplorerUrlIndex);
```
can we confirm no regressions where introduced in `switchToNetwork` call on `wallet_addEthereumChain`,  with changing `isAddNetworkFlow` from always being true, to now falling back to `autoApprove` (which computes to the `shouldAddOrUpdateNetwork` value above) ?

E2E Smoke tests seem to be passing but better safe than sorry since this handler is somewhat complex logic-wise on mobile codebase.
created_at: 2025-05-21T09:46:31Z
author_association: MEMBER
diff_hunk: @@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
path: app/core/RPCMethods/wallet_addEthereumChain.js
user: login: FrederikBolding
body: You tell me 😄 I'm not familiar enough with this code to check for regressions beyond what I've already done and all tests seem to pass.
created_at: 2025-05-21T09:47:22Z
author_association: MEMBER
diff_hunk: @@ -28,12 +27,12 @@ const approvalLog = createProjectLogger('approval-utils');
  * Requests user approval for the CAIP-25 permission for the specified origin
  * and returns a granted permissions object.
  *
- * @param {string} origin - The origin to request approval for.
+ * @param {string} _origin - The origin to request approval for.
  * @param requestedPermissions - The legacy permissions to request approval for.
  * @returns the approved permissions object.
  */
 export const getCaip25PermissionFromLegacyPermissions = (
-  origin: string,
+  _origin: string,
path: app/util/permissions/index.ts
user: login: ffmcgee725
body: `_origin` is not necessary anymore for this function, so we can refactor this to remove this parameter altogether.
created_at: 2025-05-21T09:48:22Z
author_association: MEMBER
diff_hunk: @@ -28,12 +27,12 @@ const approvalLog = createProjectLogger('approval-utils');
  * Requests user approval for the CAIP-25 permission for the specified origin
  * and returns a granted permissions object.
  *
- * @param {string} origin - The origin to request approval for.
+ * @param {string} _origin - The origin to request approval for.
  * @param requestedPermissions - The legacy permissions to request approval for.
  * @returns the approved permissions object.
  */
 export const getCaip25PermissionFromLegacyPermissions = (
-  origin: string,
+  _origin: string,
path: app/util/permissions/index.ts
user: login: FrederikBolding
body: Simply mirroring the changes in https://github.com/MetaMask/metamask-extension/pull/33018 to reduce the diff here. We can always remove this in a follow-up refactor.
created_at: 2025-05-21T09:50:36Z
author_association: MEMBER
diff_hunk: @@ -28,12 +27,12 @@ const approvalLog = createProjectLogger('approval-utils');
  * Requests user approval for the CAIP-25 permission for the specified origin
  * and returns a granted permissions object.
  *
- * @param {string} origin - The origin to request approval for.
+ * @param {string} _origin - The origin to request approval for.
  * @param requestedPermissions - The legacy permissions to request approval for.
  * @returns the approved permissions object.
  */
 export const getCaip25PermissionFromLegacyPermissions = (
-  origin: string,
+  _origin: string,
path: app/util/permissions/index.ts
user: login: ffmcgee725
body: If we have a ticket to keep track of this, or make sure we address it in follow up refactor right after so it doesn't get lost in time, I'm okay with proceeding as such. Keeping diff to a minimum seems to make sense
created_at: 2025-05-21T11:35:00Z
author_association: MEMBER
diff_hunk: @@ -28,12 +27,12 @@ const approvalLog = createProjectLogger('approval-utils');
  * Requests user approval for the CAIP-25 permission for the specified origin
  * and returns a granted permissions object.
  *
- * @param {string} origin - The origin to request approval for.
+ * @param {string} _origin - The origin to request approval for.
  * @param requestedPermissions - The legacy permissions to request approval for.
  * @returns the approved permissions object.
  */
 export const getCaip25PermissionFromLegacyPermissions = (
-  origin: string,
+  _origin: string,
path: app/util/permissions/index.ts
user: login: FrederikBolding
body: https://github.com/MetaMask/metamask-mobile/issues/15520
created_at: 2025-05-21T11:36:37Z
author_association: MEMBER
diff_hunk: @@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
path: app/core/RPCMethods/wallet_addEthereumChain.js
user: login: ffmcgee725
body: 
https://github.com/user-attachments/assets/2445efee-2522-440d-b8a3-9397ade269fb

I mean something like this, changing chain via the dapp to make sure the confirmation pop up to use the recently enabled network shows 
created_at: 2025-05-21T11:42:50Z
author_association: MEMBER
diff_hunk: @@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
path: app/core/RPCMethods/wallet_addEthereumChain.js
user: login: FrederikBolding
body: I've done basic testing on the existing functionality before posting the PR for review, including existing EVM functionality as described in the video 👍 
created_at: 2025-05-21T11:57:51Z
author_association: MEMBER
diff_hunk: @@ -107,7 +107,6 @@ export const wallet_addEthereumChain = async ({
       requestUserApproval,
       analytics,
       origin,
-      isAddNetworkFlow,
       autoApprove: shouldAddOrUpdateNetwork,
path: app/core/RPCMethods/wallet_addEthereumChain.js
user: login: FrederikBolding
body: If you are asking for anything beyond that I would appreciate the help sanity checking the edge-cases.
created_at: 2025-05-21T11:58:36Z
author_association: MEMBER

PR comments:
user: login: socket-security[bot]
created_at: 2025-05-20T09:06:51Z
body: **Review the following changes in direct dependencies.** Learn more about [Socket for GitHub](https://socket.dev?utm_medium=gh).

<table>
<thead>
<tr>
<th>Diff</th>
<th width="200px">Package</th>
<th align="left" width="100px">Supply Chain<br/>Security</th>
<th align="left" width="100px">Vulnerability</th>
<th align="left" width="100px">Quality</th>
<th align="left" width="100px">Maintenance</th>
<th align="left" width="100px">License</th>
</tr>
</thead>
<tbody>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053">npm/​@​metamask/​snaps-utils@​9.2.2 ⏵ 9.3.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/score-96.svg" title="Supply Chain Security" width="40" height="40" alt="96"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/score-74.svg" title="Quality" width="40" height="40" alt="74"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/score-99.svg" title="Maintenance" width="40" height="40" alt="99"></a> <sup>+2</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675053"><img src="https://github-app-statics.socket.dev/score-100.svg" title="License" width="40" height="40" alt="100"></a></td></tr>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199">npm/​@​metamask/​snaps-rpc-methods@​12.2.0 ⏵ 12.3.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/score-94.svg" title="Supply Chain Security" width="40" height="40" alt="94"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/score-74.svg" title="Quality" width="40" height="40" alt="74"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/score-98.svg" title="Maintenance" width="40" height="40" alt="98"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202199"><img src="https://github-app-statics.socket.dev/score-50.svg" title="License" width="40" height="40" alt="50"></a></td></tr>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489">npm/​@​metamask/​selected-network-controller@​22.0.0 ⏵ 22.1.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/score-90.svg" title="Supply Chain Security" width="40" height="40" alt="90"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/score-74.svg" title="Quality" width="40" height="40" alt="74"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/score-96.svg" title="Maintenance" width="40" height="40" alt="96"></a> <sup>+5</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31555180489"><img src="https://github-app-statics.socket.dev/score-100.svg" title="License" width="40" height="40" alt="100"></a></td></tr>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213">npm/​@​metamask/​snaps-execution-environments@​8.0.1 ⏵ 8.1.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/score-93.svg" title="Supply Chain Security" width="40" height="40" alt="93"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/score-75.svg" title="Quality" width="40" height="40" alt="75"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/score-99.svg" title="Maintenance" width="40" height="40" alt="99"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31553202213"><img src="https://github-app-statics.socket.dev/score-80.svg" title="License" width="40" height="40" alt="80"></a> <sup>+31</sup></td></tr>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052">npm/​@​metamask/​snaps-sdk@​6.23.0 ⏵ 6.24.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/score-95.svg" title="Supply Chain Security" width="40" height="40" alt="95"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/score-76.svg" title="Quality" width="40" height="40" alt="76"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/score-99.svg" title="Maintenance" width="40" height="40" alt="99"></a> <sup>+2</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=31548675052"><img src="https://github-app-statics.socket.dev/score-100.svg" title="License" width="40" height="40" alt="100"></a></td></tr>
<tr><td align="center"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/diff-updated.svg" title="Updated" alt="Updated" width="20" height="20"></a></td><td><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544">npm/​@​metamask/​snaps-controllers@​12.0.1 ⏵ 12.2.0</a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Supply Chain Security" width="40" height="40" alt="100"></a> <sup>+8</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Vulnerability" width="40" height="40" alt="100"></a></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Quality" width="40" height="40" alt="100"></a> <sup>+27</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/score-100.svg" title="Maintenance" width="40" height="40" alt="100"></a> <sup>+1</sup></td><td align="left"><a href="https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies&dependency_item_key=32695797544"><img src="https://github-app-statics.socket.dev/score-100.svg" title="License" width="40" height="40" alt="100"></a> <sup>+50</sup></td></tr>
</tbody>
</table>

[View full report](https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=dependencies)

<!-- overview-comment -->
author_association: NONE
user: login: socket-security[bot]
created_at: 2025-05-20T09:06:52Z
body: **All alerts resolved.** Learn more about [Socket for GitHub](https://socket.dev?utm_medium=gh).

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

**Ignoring alerts on:**

- `npm/@metamask/snaps-execution-environments@8.1.0`

[View full report](https://socket.dev/dashboard/org/MetaMask/diff/fb77d481-02a7-41bf-87e2-bca85c3b8b2d/0c5eea10-4488-48f9-ba9d-f2a2930ad45d?tab=alerts&action=error%2Cwarn)
author_association: NONE
user: login: FrederikBolding
created_at: 2025-05-20T09:07:33Z
body: @SocketSecurity ignore npm/@metamask/snaps-execution-environments@8.1.0

Network access is expected.
author_association: MEMBER
user: login: github-actions[bot]
created_at: 2025-05-21T08:14:33Z
body: ## [<img alt="https://bitrise.io/" src="https://assets-global.website-files.com/5db35de024bb983af1b4e151/5e6f9ccc3e129dfd8a205e4e_Bitrise%20Logo%20-%20Eggplant%20Bg.png" height="20">](https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1314b54d-8de1-44f7-8282-22a80e43b5b9) **Bitrise**

🔄🔄🔄 `pr_smoke_e2e_pipeline` started on Bitrise...🔄🔄🔄

Commit hash: 8a96f7101a97fee1c6edbbb3827376542ff8589c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1314b54d-8de1-44f7-8282-22a80e43b5b9

>[!NOTE]
>- This comment will auto-update when build completes
>- You can kick off another `pr_smoke_e2e_pipeline` on Bitrise by removing and re-applying the `Run Smoke E2E` label on the pull request
<!-- BITRISE_TAG -->
<!-- BITRISE_PENDING_TAG -->

<!-- 8a96f7101a97fee1c6edbbb3827376542ff8589c -->
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-05-21T08:18:29Z
body: ## [<img alt="https://bitrise.io/" src="https://assets-global.website-files.com/5db35de024bb983af1b4e151/5e6f9ccc3e129dfd8a205e4e_Bitrise%20Logo%20-%20Eggplant%20Bg.png" height="20">](https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e58e7713-c956-46da-86db-c2d49237139b) **Bitrise**

✅✅✅ `pr_smoke_e2e_pipeline` passed on Bitrise! ✅✅✅

Commit hash: faf748e341dfc349502012e3b0b47b775c6246b4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e58e7713-c956-46da-86db-c2d49237139b

>[!NOTE]
>- You can kick off another `pr_smoke_e2e_pipeline` on Bitrise by removing and re-applying the `Run Smoke E2E` label on the pull request

<!-- BITRISE_TAG -->
<!-- BITRISE_SUCCESS_TAG -->

<!-- faf748e341dfc349502012e3b0b47b775c6246b4 -->
author_association: CONTRIBUTOR
user: login: sonarqubecloud[bot]
created_at: 2025-05-21T08:32:03Z
body: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=metamask-mobile&pullRequest=15477) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [77.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=metamask-mobile&pullRequest=15477&metric=new_coverage&view=list) (required ≥ 80%)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=metamask-mobile&pullRequest=15477)


author_association: NONE