From 51798b895fb1e3f17c86eb72d0ca364467c3ce39 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Wed, 27 Nov 2024 12:16:42 +0000 Subject: [PATCH 1/8] fix: gas fee edit from swaps (#12455) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Prevent crash when editing gas fee during swap. ## **Related issues** Fixes: #12387 #12457 ## **Manual testing steps** See issue. ## **Screenshots/Recordings** ### **Before** ### **After** https://github.com/user-attachments/assets/6dd625b2-f18f-496d-9843-118575ed9166 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- .../__snapshots__/index.test.tsx.snap | 35 ++++++++++++++++++- app/components/UI/EditGasFee1559/index.js | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/app/components/UI/EditGasFee1559/__snapshots__/index.test.tsx.snap b/app/components/UI/EditGasFee1559/__snapshots__/index.test.tsx.snap index 9e57dc2ffc7..d1dd983557a 100644 --- a/app/components/UI/EditGasFee1559/__snapshots__/index.test.tsx.snap +++ b/app/components/UI/EditGasFee1559/__snapshots__/index.test.tsx.snap @@ -135,7 +135,40 @@ exports[`EditGasFee1559 should render correctly 1`] = ` + Low + , + "name": "low", + "topLabel": false, + }, + { + "label": + Market + , + "name": "medium", + "topLabel": false, + }, + { + "label": + Aggressive + , + "name": "high", + "topLabel": false, + }, + ] + } /> From eabb61ae0a80ae78daf4305f7dc3a5e835d8765a Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:47:06 +0100 Subject: [PATCH 2/8] refactor: use `withKeyring` to batch account restore operation (#11409) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** ### The problem With the current used version of `KeyringController`, the `addNewAccountWithoutUpdate` method is not doing what its name claims - the state is updated everytime the function is called. This is because `KeyringController` has no control over its messenger's listeners, and so `PreferencesController` and `AccountsController` (and so on downstream) will react to keyrings state updates everytime `addNewAccountWithoutUpdate` is called. The result is that the `importAdditionalAccounts` helper present on mobile is incredibly inefficient, as accounts will be added one by one, executing _all_ side effects at every single iteration. ### The solution This PR leverages the new `withKeyring` method from KeyringController to batch these iterations into one single atomic state update - take a look at the code for more info about how it is done ## **Related issues** Related: https://github.com/MetaMask/core/issues/3848 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- app/util/importAdditionalAccounts.js | 60 ------------ app/util/importAdditionalAccounts.test.ts | 111 ++++++++++++++++++++++ app/util/importAdditionalAccounts.ts | 60 ++++++++++++ 3 files changed, 171 insertions(+), 60 deletions(-) delete mode 100644 app/util/importAdditionalAccounts.js create mode 100644 app/util/importAdditionalAccounts.test.ts create mode 100644 app/util/importAdditionalAccounts.ts diff --git a/app/util/importAdditionalAccounts.js b/app/util/importAdditionalAccounts.js deleted file mode 100644 index 9b015ce661b..00000000000 --- a/app/util/importAdditionalAccounts.js +++ /dev/null @@ -1,60 +0,0 @@ -import Engine from '../core/Engine'; -import { BNToHex } from '../util/number'; -import Logger from '../util/Logger'; -import ExtendedKeyringTypes from '../../app/constants/keyringTypes'; - -const HD_KEY_TREE_ERROR = 'MetamaskController - No HD Key Tree found'; -const ZERO_BALANCE = '0x0'; -const MAX = 20; - -/** - * Get an account balance from the network. - * @param {string} address - The account address - * @param {EthQuery} ethQuery - The EthQuery instance to use when asking the network - */ -const getBalance = async (address, ethQuery) => - new Promise((resolve, reject) => { - ethQuery.getBalance(address, (error, balance) => { - if (error) { - reject(error); - Logger.error(error); - } else { - const balanceHex = BNToHex(balance); - resolve(balanceHex || ZERO_BALANCE); - } - }); - }); - -/** - * Add additional accounts in the wallet based on balance - */ -export default async () => { - const { KeyringController } = Engine.context; - - const ethQuery = Engine.getGlobalEthQuery(); - let accounts = await KeyringController.getAccounts(); - let lastBalance = await getBalance(accounts[accounts.length - 1], ethQuery); - - const { keyrings } = KeyringController.state; - const filteredKeyrings = keyrings.filter( - (keyring) => keyring.type === ExtendedKeyringTypes.hd, - ); - const primaryKeyring = filteredKeyrings[0]; - if (!primaryKeyring) throw new Error(HD_KEY_TREE_ERROR); - - let i = 0; - // seek out the first zero balance - while (lastBalance !== ZERO_BALANCE) { - if (i === MAX) break; - await KeyringController.addNewAccountWithoutUpdate(primaryKeyring); - accounts = await KeyringController.getAccounts(); - lastBalance = await getBalance(accounts[accounts.length - 1], ethQuery); - i++; - } - - // remove extra zero balance account potentially created from seeking ahead - if (accounts.length > 1 && lastBalance === ZERO_BALANCE) { - await KeyringController.removeAccount(accounts[accounts.length - 1]); - accounts = await KeyringController.getAccounts(); - } -}; diff --git a/app/util/importAdditionalAccounts.test.ts b/app/util/importAdditionalAccounts.test.ts new file mode 100644 index 00000000000..bc72c072edd --- /dev/null +++ b/app/util/importAdditionalAccounts.test.ts @@ -0,0 +1,111 @@ +import importAdditionalAccounts from './importAdditionalAccounts'; +import { BN } from 'ethereumjs-util'; + +const mockKeyring = { + addAccounts: jest.fn(), + removeAccount: jest.fn(), +}; + +const mockEthQuery = { + getBalance: jest.fn(), +}; + +jest.mock('../core/Engine', () => ({ + context: { + KeyringController: { + withKeyring: jest.fn((_keyring, callback) => callback(mockKeyring)), + }, + }, + getGlobalEthQuery: () => mockEthQuery, +})); + +/** + * Set the balance that will be queried for the account + * + * @param balance - The balance to be queried + */ +function setQueriedBalance(balance: BN) { + mockEthQuery.getBalance.mockImplementation((_, callback) => + callback(null, balance), + ); +} + +/** + * Set the balance that will be queried for the account once + * + * @param balance - The balance to be queried + */ +function setQueriedBalanceOnce(balance: BN) { + mockEthQuery.getBalance.mockImplementationOnce((_, callback) => { + callback(null, balance); + }); +} + +describe('importAdditionalAccounts', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('when there is no account with balance', () => { + it('should not add any account', async () => { + setQueriedBalance(new BN(0)); + mockKeyring.addAccounts.mockResolvedValue(['0x1234']); + + await importAdditionalAccounts(); + + expect(mockKeyring.addAccounts).toHaveBeenCalledTimes(1); + expect(mockKeyring.removeAccount).toHaveBeenCalledTimes(1); + expect(mockKeyring.removeAccount).toHaveBeenCalledWith('0x1234'); + }); + }); + + describe('when there is an account with balance', () => { + it('should add 1 account', async () => { + setQueriedBalanceOnce(new BN(1)); + setQueriedBalanceOnce(new BN(0)); + mockKeyring.addAccounts + .mockResolvedValueOnce(['0x1234']) + .mockResolvedValueOnce(['0x5678']); + + await importAdditionalAccounts(); + + expect(mockKeyring.addAccounts).toHaveBeenCalledTimes(2); + expect(mockKeyring.removeAccount).toHaveBeenCalledWith('0x5678'); + }); + }); + + describe('when there are multiple accounts with balance', () => { + it('should add 2 accounts', async () => { + setQueriedBalanceOnce(new BN(1)); + setQueriedBalanceOnce(new BN(2)); + setQueriedBalanceOnce(new BN(0)); + mockKeyring.addAccounts + .mockResolvedValueOnce(['0x1234']) + .mockResolvedValueOnce(['0x5678']) + .mockResolvedValueOnce(['0x9abc']); + + await importAdditionalAccounts(); + + expect(mockKeyring.addAccounts).toHaveBeenCalledTimes(3); + expect(mockKeyring.removeAccount).toHaveBeenCalledWith('0x9abc'); + }); + }); + + describe('when ethQuery.getBalance throws an error', () => { + it('should not remove all the accounts', async () => { + setQueriedBalanceOnce(new BN(1)); + mockEthQuery.getBalance.mockImplementationOnce((_, callback) => + callback(new Error('error')), + ); + mockKeyring.addAccounts + .mockResolvedValueOnce(['0x1234']) + .mockResolvedValueOnce(['0x5678']); + + await importAdditionalAccounts(); + + expect(mockKeyring.addAccounts).toHaveBeenCalledTimes(2); + expect(mockKeyring.removeAccount).toHaveBeenCalledTimes(1); + expect(mockKeyring.removeAccount).toHaveBeenCalledWith('0x5678'); + }); + }); +}); diff --git a/app/util/importAdditionalAccounts.ts b/app/util/importAdditionalAccounts.ts new file mode 100644 index 00000000000..8da7200d9f4 --- /dev/null +++ b/app/util/importAdditionalAccounts.ts @@ -0,0 +1,60 @@ +import Engine from '../core/Engine'; +import { BNToHex } from '../util/number'; +import Logger from '../util/Logger'; +import ExtendedKeyringTypes from '../../app/constants/keyringTypes'; +import type EthQuery from '@metamask/eth-query'; +import type { BN } from 'ethereumjs-util'; +import { Hex } from '@metamask/utils'; + +const ZERO_BALANCE = '0x0'; +const MAX = 20; + +/** + * Get an account balance from the network. + * @param address - The account address + * @param ethQuery - The EthQuery instance to use when asking the network + */ +const getBalance = async (address: string, ethQuery: EthQuery): Promise => + new Promise((resolve, reject) => { + ethQuery.getBalance(address, (error: Error, balance: BN) => { + if (error) { + reject(error); + Logger.error(error); + } else { + const balanceHex = BNToHex(balance); + resolve(balanceHex || ZERO_BALANCE); + } + }); + }); + +/** + * Add additional accounts in the wallet based on balance + */ +export default async () => { + const { KeyringController } = Engine.context; + const ethQuery = Engine.getGlobalEthQuery(); + + await KeyringController.withKeyring( + { type: ExtendedKeyringTypes.hd }, + async (primaryKeyring) => { + for (let i = 0; i < MAX; i++) { + const [newAccount] = await primaryKeyring.addAccounts(1); + + let newAccountBalance = ZERO_BALANCE; + try { + newAccountBalance = await getBalance(newAccount, ethQuery); + } catch (error) { + // Errors are gracefully handled so that `withKeyring` + // will not rollback the primary keyring, and accounts + // created in previous loop iterations will remain in place. + } + + if (newAccountBalance === ZERO_BALANCE) { + // remove extra zero balance account we just added and break the loop + primaryKeyring.removeAccount?.(newAccount); + break; + } + } + }, + ); +}; From 6f831d4802c9b9ea31f94524a73a6e7c2b175496 Mon Sep 17 00:00:00 2001 From: EtherWizard33 <165834542+EtherWizard33@users.noreply.github.com> Date: Wed, 27 Nov 2024 08:44:34 -0500 Subject: [PATCH 3/8] test: add a new unit test to cover for multichain feature flags ON (#12442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Once we remove the feature flags, we can delete the old tests, until then this ensure both side of the code is tested. ## **Description** - Modifying the env variable corresponding to the feature flag didnt take effect in the test, had to find another way, mocking the getter of the feture flag - Mocking the getter worked, but modifying the mock inside the same test file didnt take effect in the component, re-importing the component caused all other mocks to fail, setting all mocks a second time didn't work. - Finally something did work, which is having each test in their own test file is the only way i could get the mocks initialized with expected values. ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3664 ## **Manual testing steps** 1. run `npx jest app/components/Views/AccountPermissions/**` and all tests should pass ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- .../AccountPermissions.ff-on.test.tsx | 79 +++++ .../AccountPermissions.test.tsx | 6 + .../AccountPermissions.ff-on.test.tsx.snap | 309 ++++++++++++++++++ 3 files changed, 394 insertions(+) create mode 100644 app/components/Views/AccountPermissions/AccountPermissions.ff-on.test.tsx create mode 100644 app/components/Views/AccountPermissions/__snapshots__/AccountPermissions.ff-on.test.tsx.snap diff --git a/app/components/Views/AccountPermissions/AccountPermissions.ff-on.test.tsx b/app/components/Views/AccountPermissions/AccountPermissions.ff-on.test.tsx new file mode 100644 index 00000000000..46932be4bbc --- /dev/null +++ b/app/components/Views/AccountPermissions/AccountPermissions.ff-on.test.tsx @@ -0,0 +1,79 @@ +// Mock the networks module before any imports + +import React from 'react'; +import renderWithProvider, { + DeepPartial, +} from '../../../util/test/renderWithProvider'; +import { backgroundState } from '../../../util/test/initial-root-state'; +import { RootState } from '../../../reducers'; +import AccountPermissions from './AccountPermissions'; + +const mockedNavigate = jest.fn(); +const mockedGoBack = jest.fn(); +const mockedTrackEvent = jest.fn(); + +// Mock navigation +jest.mock('@react-navigation/native', () => { + const actualNav = jest.requireActual('@react-navigation/native'); + return { + ...actualNav, + useNavigation: () => ({ + navigate: mockedNavigate, + goBack: mockedGoBack, + setOptions: jest.fn(), + }), + }; +}); + +// Mock safe area context +jest.mock('react-native-safe-area-context', () => { + const inset = { top: 0, right: 0, bottom: 0, left: 0 }; + const frame = { width: 0, height: 0, x: 0, y: 0 }; + return { + SafeAreaProvider: jest.fn().mockImplementation(({ children }) => children), + SafeAreaConsumer: jest + .fn() + .mockImplementation(({ children }) => children(inset)), + useSafeAreaInsets: jest.fn().mockImplementation(() => inset), + useSafeAreaFrame: jest.fn().mockImplementation(() => frame), + }; +}); + +// Mock metrics +jest.mock('../../../components/hooks/useMetrics', () => ({ + useMetrics: () => ({ + trackEvent: mockedTrackEvent, + }), +})); + +jest.mock('../../../util/networks/index.js', () => ({ + ...jest.requireActual('../../../util/networks/index.js'), + isMultichainVersion1Enabled: true, + isChainPermissionsFeatureEnabled: true, +})); + +const mockInitialState: DeepPartial = { + settings: {}, + engine: { + backgroundState: { + ...backgroundState, + }, + }, +}; + +describe('AccountPermissions with feature flags ON', () => { + it('should render AccountPermissions with multichain and chain permissions enabled', () => { + const { toJSON } = renderWithProvider( + , + { state: mockInitialState }, + ); + + expect(toJSON()).toMatchSnapshot('AccountPermissions-FeatureFlagsOn'); + }); +}); diff --git a/app/components/Views/AccountPermissions/AccountPermissions.test.tsx b/app/components/Views/AccountPermissions/AccountPermissions.test.tsx index dbe74031c16..13073b9ce52 100644 --- a/app/components/Views/AccountPermissions/AccountPermissions.test.tsx +++ b/app/components/Views/AccountPermissions/AccountPermissions.test.tsx @@ -27,6 +27,12 @@ jest.mock('../../../components/hooks/useMetrics', () => ({ }), })); +jest.mock('../../../util/networks/index.js', () => ({ + ...jest.requireActual('../../../util/networks/index.js'), + isMultichainVersion1Enabled: false, + isChainPermissionsFeatureEnabled: false, +})); + jest.mock('react-native-safe-area-context', () => { const inset = { top: 0, right: 0, bottom: 0, left: 0 }; const frame = { width: 0, height: 0, x: 0, y: 0 }; diff --git a/app/components/Views/AccountPermissions/__snapshots__/AccountPermissions.ff-on.test.tsx.snap b/app/components/Views/AccountPermissions/__snapshots__/AccountPermissions.ff-on.test.tsx.snap new file mode 100644 index 00000000000..120a251bf7c --- /dev/null +++ b/app/components/Views/AccountPermissions/__snapshots__/AccountPermissions.ff-on.test.tsx.snap @@ -0,0 +1,309 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AccountPermissions with feature flags ON should render AccountPermissions with multichain and chain permissions enabled: AccountPermissions-FeatureFlagsOn 1`] = ` + + + + + + + + + + + + + + + test + + + + + Connected accounts + + + + + + + + + + Connect more accounts + + + + + + + Manage Permissions + + + + + +`; From 756385e462f8f85aead5dd2c9c2fdeb2695e90da Mon Sep 17 00:00:00 2001 From: Bryan Fullam Date: Wed, 27 Nov 2024 21:43:42 +0700 Subject: [PATCH 4/8] refactor: update swaps quote poll count (#12202) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Brings the swaps page to parity with extension by increasing the umber of quote refreshes from 2 to 3. ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to the swaps 2. Enter arbitrary swap amounts/tokens 3. Get quotes 4. Wait for quotes to refresh 3 times ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- app/core/AppConstants.ts | 2 +- app/core/Engine/Engine.ts | 1 + e2e/fixtures/fixture-builder.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/core/AppConstants.ts b/app/core/AppConstants.ts index 154e22a954a..51c67f10736 100644 --- a/app/core/AppConstants.ts +++ b/app/core/AppConstants.ts @@ -88,7 +88,7 @@ export default { ONLY_MAINNET: true, CLIENT_ID: 'mobile', LIVENESS_POLLING_FREQUENCY: 5 * 60 * 1000, - POLL_COUNT_LIMIT: 3, + POLL_COUNT_LIMIT: 4, DEFAULT_SLIPPAGE: 2, CACHE_AGGREGATOR_METADATA_THRESHOLD: 5 * 60 * 1000, CACHE_TOKENS_THRESHOLD: 5 * 60 * 1000, diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index d94a67b96b0..d04d76c64af 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -1379,6 +1379,7 @@ export class Engine { ], allowedEvents: [], }), + pollCountLimit: AppConstants.SWAPS.POLL_COUNT_LIMIT, // TODO: Remove once GasFeeController exports this action type fetchGasFeeEstimates: () => gasFeeController.fetchGasFeeEstimates(), // @ts-expect-error TODO: Resolve mismatch between gas fee and swaps controller types diff --git a/e2e/fixtures/fixture-builder.js b/e2e/fixtures/fixture-builder.js index d01e3fa41fe..055b46d0ad0 100644 --- a/e2e/fixtures/fixture-builder.js +++ b/e2e/fixtures/fixture-builder.js @@ -389,7 +389,7 @@ class FixtureBuilder { topAggId: null, tokensLastFetched: 0, isInPolling: false, - pollingCyclesLeft: 3, + pollingCyclesLeft: 4, quoteRefreshSeconds: null, usedGasEstimate: null, usedCustomGas: null, From 717fafa1ed2f6236a32a307c5de73bf32161876a Mon Sep 17 00:00:00 2001 From: Pedro Pablo Aste Kompen Date: Wed, 27 Nov 2024 13:33:20 -0300 Subject: [PATCH 5/8] chore(ramp): upgrade sdk to 1.28.7 (#12440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR upgrades Ramp SDK to v1.28.7. Changes include a fix that brings back a file containing the required arguments for services methods. ## **Related issues** Fixes: ## **Manual testing steps** 1. Go Ramp flows 2. Flows are not impacted ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- package.json | 4 ++-- yarn.lock | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index cf3f03e59a9..babd0ee8fa6 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "**/@metamask/rpc-errors": "7.0.1" }, "dependencies": { - "@consensys/on-ramp-sdk": "1.28.5", + "@consensys/on-ramp-sdk": "1.28.7", "@keystonehq/bc-ur-registry-eth": "^0.19.1", "@keystonehq/metamask-airgapped-keyring": "^0.13.1", "@keystonehq/ur-decoder": "^0.12.2", @@ -146,9 +146,9 @@ "@metamask/composable-controller": "^3.0.0", "@metamask/controller-utils": "^11.3.0", "@metamask/design-tokens": "^4.0.0", - "@metamask/eth-ledger-bridge-keyring": "^6.0.0", "@metamask/eth-json-rpc-filters": "^8.0.0", "@metamask/eth-json-rpc-middleware": "^11.0.2", + "@metamask/eth-ledger-bridge-keyring": "^6.0.0", "@metamask/eth-query": "^4.0.0", "@metamask/eth-sig-util": "^7.0.2", "@metamask/eth-snap-keyring": "^4.3.3", diff --git a/yarn.lock b/yarn.lock index 05a083f386a..2d286899afd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1438,10 +1438,10 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== -"@consensys/on-ramp-sdk@1.28.5": - version "1.28.5" - resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-1.28.5.tgz#b9ff6c2b0f46abef30bd32a720f34d963aa76491" - integrity sha512-tBZ2ZsEz+du/vHF4NChTTvcdYddoJCtNZDZj5lry8/TeNxctnYiZGx2tHtw2GJHfYa9Uuux2hwtdhubcR//ZeA== +"@consensys/on-ramp-sdk@1.28.7": + version "1.28.7" + resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-1.28.7.tgz#fe26b8935219b2a782c8adc83db7be649cfcd243" + integrity sha512-2UE6FBuscFrsA/nUi1ZYu+sK0IXM1BbxN1876uHb9+LUGrtrBrnyMa9hrMJYRc9so7i+8Gy4bty70kCOIqzeGw== dependencies: async "^3.2.3" axios "^0.28.0" @@ -11995,9 +11995,9 @@ aws4@^1.8.0: integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axios-retry@^3.1.2: - version "3.2.5" - resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.2.5.tgz#64952992837c7d9a12eec156a2694a7945f60895" - integrity sha512-a8umkKbfIkTiYJQLx3v3TzKM85TGKB8ZQYz4zwykt2fpO64TsRlUhjaPaAb3fqMWCXFm2YhWcd8V5FHDKO9bSA== + version "3.9.1" + resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.9.1.tgz#c8924a8781c8e0a2c5244abf773deb7566b3830d" + integrity sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w== dependencies: "@babel/runtime" "^7.15.4" is-retry-allowed "^2.2.0" @@ -24529,11 +24529,16 @@ redux@^4.0.5, redux@^4.2.1: dependencies: "@babel/runtime" "^7.9.2" -reflect-metadata@0.1.13, reflect-metadata@^0.1.13: +reflect-metadata@0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== +reflect-metadata@^0.1.13: + version "0.1.14" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.14.tgz#24cf721fe60677146bb77eeb0e1f9dece3d65859" + integrity sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A== + reflect.getprototypeof@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859" From 9059cc08300a2d1edce19306014f2de657de0032 Mon Sep 17 00:00:00 2001 From: Owen Craston Date: Wed, 27 Nov 2024 15:36:48 -0800 Subject: [PATCH 6/8] chore: Update accounts-controller @v19.0.0 and keyring-controller @v18.0.0 (#12339) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR updates the accounts controller to the latest version of 19. This updates requires a peer dependancy bump of the keyring controller to version 18.0.0 - See accounts controller [changelog](https://github.com/MetaMask/core/blob/main/packages/accounts-controller/CHANGELOG.md#1900). - See keyring controller [changelog](https://github.com/MetaMask/core/blob/main/packages/keyring-controller/CHANGELOG.md#1800). - version 18 of the keyring controller removes the [addNewAccountWithoutUpdate](https://github.com/MetaMask/core/pull/4845) which is used once in the mobile repo. In order to merge this PR we will need to wait for @mikesposito's [PR to merge](https://github.com/MetaMask/metamask-mobile/pull/11409). This PR removes the need for `addNewAccountWithoutUpdate` and improves performance/reliability. ## **Related issues** Fixes: https://github.com/MetaMask/metamask-mobile/issues/12302 Fixes: https://github.com/MetaMask/metamask-mobile/issues/12304 Unblocked by: https://github.com/MetaMask/metamask-mobile/pull/11409 ## **Manual testing steps** #### Account creation 1. open app 2. press create wallet 3. go through the onboarding flow 4. once onboarding is complete, you should be on the wallet view and see a single account 5. open the account selector list and add a new account' 6. this should work without issues 7. change the name of your new account 8. force close the app and reopen, the previously selected account should be the same and the custom name should be preserved. #### Account importing 1. assuming you have created a wallet wth the above steps.... 2. open the account selector list and click add account or hardware wallet and then click import account 3. paste a private key in this text field and then import 4. the account should be imported, selected and have the label "imported" 5. force closing the app and re opening it should preserve the same state of accounts #### Hardware wallets 1. assuming you have created a wallet wth the above steps.... 2. open the account selector list and click add account or hardware wallet and then click Add hardware wallet 3. select your hardware wallet of choice (ledger or qr based) 4. follow the instructions to add a hardware wallet 5. the steps should work and you should have successfully added a hardware account 6. the hardware account should have the correct labels (either Qr hardware or ledger) 7. force closing the app and reopening should preserve the same accounts state. ## **Screenshots/Recordings** ### **Before** ### **After** https://github.com/user-attachments/assets/ab8ca48e-dc48-4601-a56c-5c6d7fabab3e ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- app/core/Engine/Engine.ts | 8 +- .../RPCMethods/RPCMethodMiddleware.test.ts | 1 - package.json | 6 +- yarn.lock | 258 +++++++++--------- 4 files changed, 134 insertions(+), 139 deletions(-) diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index d04d76c64af..46619417a86 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -62,7 +62,7 @@ import { } from '@metamask/snaps-controllers'; import { WebViewExecutionService } from '@metamask/snaps-controllers/react-native'; -import { NotificationParameters } from '@metamask/snaps-rpc-methods/dist/restricted/notify.cjs'; +import { NotificationArgs } from '@metamask/snaps-rpc-methods/dist/restricted/notify.cjs'; import { getSnapsWebViewPromise } from '../../lib/snaps'; import { buildSnapEndowmentSpecifications, @@ -633,7 +633,7 @@ export class Engine { type, requestData: { content, placeholder }, }), - showInAppNotification: (origin: string, args: NotificationParameters) => { + showInAppNotification: (origin: string, args: NotificationArgs) => { Logger.log( 'Snaps/ showInAppNotification called with args: ', args, @@ -696,7 +696,6 @@ export class Engine { includeStakedAssets: isPooledStakingFeatureEnabled(), }); const permissionController = new PermissionController({ - // @ts-expect-error TODO: Resolve mismatch between base-controller versions. messenger: this.controllerMessenger.getRestricted({ name: 'PermissionController', allowedActions: [ @@ -788,7 +787,6 @@ export class Engine { ///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps) this.subjectMetadataController = new SubjectMetadataController({ - // @ts-expect-error TODO: Resolve mismatch between base-controller versions. messenger: this.controllerMessenger.getRestricted({ name: 'SubjectMetadataController', allowedActions: [`${permissionController.name}:hasPermissions`], @@ -838,7 +836,6 @@ export class Engine { const requireAllowlist = process.env.METAMASK_BUILD_TYPE === 'main'; const disableSnapInstallation = process.env.METAMASK_BUILD_TYPE === 'main'; const allowLocalSnaps = process.env.METAMASK_BUILD_TYPE === 'flask'; - // @ts-expect-error TODO: Resolve mismatch between base-controller versions. const snapsRegistryMessenger: SnapsRegistryMessenger = this.controllerMessenger.getRestricted({ name: 'SnapsRegistry', @@ -858,7 +855,6 @@ export class Engine { }); this.snapExecutionService = new WebViewExecutionService({ - // @ts-expect-error TODO: Resolve mismatch between base-controller versions. messenger: this.controllerMessenger.getRestricted({ name: 'ExecutionService', allowedActions: [], diff --git a/app/core/RPCMethods/RPCMethodMiddleware.test.ts b/app/core/RPCMethods/RPCMethodMiddleware.test.ts index 4f46dc579f3..9f02e4ae2f5 100644 --- a/app/core/RPCMethods/RPCMethodMiddleware.test.ts +++ b/app/core/RPCMethods/RPCMethodMiddleware.test.ts @@ -390,7 +390,6 @@ describe('getRpcMethodMiddleware', () => { }, ]); const permissionController = new PermissionController({ - // @ts-expect-error TODO: Resolve mismatch between base-controller versions. messenger: controllerMessenger.getRestricted({ name: 'PermissionController', allowedActions: [], diff --git a/package.json b/package.json index babd0ee8fa6..53bfadecdfe 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "@keystonehq/metamask-airgapped-keyring": "^0.13.1", "@keystonehq/ur-decoder": "^0.12.2", "@ledgerhq/react-native-hw-transport-ble": "^6.33.2", - "@metamask/accounts-controller": "^18.2.1", + "@metamask/accounts-controller": "^19.0.0", "@metamask/address-book-controller": "^6.0.1", "@metamask/approval-controller": "^7.1.0", "@metamask/assets-controllers": "^44.1.0", @@ -160,7 +160,7 @@ "@metamask/json-rpc-middleware-stream": "^8.0.2", "@metamask/key-tree": "^9.0.0", "@metamask/keyring-api": "^8.1.0", - "@metamask/keyring-controller": "^17.2.1", + "@metamask/keyring-controller": "^18.0.0", "@metamask/logging-controller": "^6.0.1", "@metamask/message-signing-snap": "^0.3.3", "@metamask/network-controller": "^21.0.0", @@ -192,7 +192,7 @@ "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/swaps-controller": "^11.0.0", "@metamask/transaction-controller": "^39.1.0", - "@metamask/utils": "^9.2.1", + "@metamask/utils": "^10.0.0", "@ngraveio/bc-ur": "^1.1.6", "@notifee/react-native": "^9.0.0", "@react-native-async-storage/async-storage": "^1.23.1", diff --git a/yarn.lock b/yarn.lock index 2d286899afd..ed2d678d30d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4080,18 +4080,18 @@ "@metamask/superstruct" "^3.1.0" "@metamask/utils" "^9.0.0" -"@metamask/accounts-controller@^18.2.1": - version "18.2.1" - resolved "https://registry.yarnpkg.com/@metamask/accounts-controller/-/accounts-controller-18.2.1.tgz#8e4a842316e9b7bbd0409b36129f7123ba4a4c79" - integrity sha512-BEvux+ZFpTOQa6HbRl7i7Tq24ztqrZIsX+H0ePh47lU+N8RWq1q0JCItV+zbsgdcYnwhtcMZTsp4jJPQwPe2og== +"@metamask/accounts-controller@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@metamask/accounts-controller/-/accounts-controller-19.0.0.tgz#33c01259c6a8009b8286f21ff92b49c041fb8f78" + integrity sha512-gAgrbW1OauEZw/aCX2W5lYjaoUP55/V/oNBYQC51WJr/J9ehpqxCmquJM3HgBvmVZfMp8koLNzKFwKm0E/jzlg== dependencies: "@ethereumjs/util" "^8.1.0" - "@metamask/base-controller" "^7.0.1" - "@metamask/eth-snap-keyring" "^4.3.3" - "@metamask/keyring-api" "^8.1.0" + "@metamask/base-controller" "^7.0.2" + "@metamask/eth-snap-keyring" "^4.3.6" + "@metamask/keyring-api" "^8.1.3" "@metamask/snaps-sdk" "^6.5.0" "@metamask/snaps-utils" "^8.1.1" - "@metamask/utils" "^9.1.0" + "@metamask/utils" "^10.0.0" deepmerge "^4.2.2" ethereum-cryptography "^2.1.2" immer "^9.0.6" @@ -4106,14 +4106,14 @@ "@metamask/controller-utils" "^11.3.0" "@metamask/utils" "^9.1.0" -"@metamask/approval-controller@^7.0.2", "@metamask/approval-controller@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@metamask/approval-controller/-/approval-controller-7.1.0.tgz#34b07bc4eaf6938b15f9d915c6885d4a5c0a5205" - integrity sha512-dhqUeX8wMzW88U+Vgr7oKf0Vouol10ncB3lxmvWyC1VZJhSOdO3VUkn0tH1lzt3ybxYVMOkPaB3gfdksfnNRyA== +"@metamask/approval-controller@^7.1.0", "@metamask/approval-controller@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@metamask/approval-controller/-/approval-controller-7.1.1.tgz#184a280647922c0bdc6644e10292c6db903a7062" + integrity sha512-sMIoO7UQ8M9Ry7qWzcqPR4leJ/P3iq4xbdqzLLLzi8Wm1l3419hSOpk04QEa2HBWJZUiGcRCkc74s/iw4OLzhg== dependencies: - "@metamask/base-controller" "^7.0.1" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/utils" "^9.1.0" + "@metamask/base-controller" "^7.0.2" + "@metamask/rpc-errors" "^7.0.1" + "@metamask/utils" "^10.0.0" nanoid "^3.1.31" "@metamask/assets-controllers@^44.1.0": @@ -4155,14 +4155,6 @@ "@metamask/utils" "^8.1.0" immer "^9.0.6" -"@metamask/base-controller@^6.0.2": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-6.0.3.tgz#9bb4e74234c1de5f99842c343ffa053c08055db1" - integrity sha512-neUqsCXRT6QYcZO51y6Y5u9NPTHuxgNsW5Z4h///o1gDdV8lBeIG/b1ne+QPK422DZMAm4ChnkG1DDNf4PkErw== - dependencies: - "@metamask/utils" "^9.1.0" - immer "^9.0.6" - "@metamask/base-controller@^7.0.1", "@metamask/base-controller@^7.0.2": version "7.0.2" resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-7.0.2.tgz#bf908858215cd4f7d072b3b0f7f0946cf886ee49" @@ -4205,7 +4197,7 @@ resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-2.5.0.tgz#33921fa9c15eb1863f55dcd5f75467ae15614ebb" integrity sha512-+j7jEcp0P1OUMEpa/OIwfJs/ahBC/akwgWxaRTSWX2SWABvlUKBVRMtslfL94Qj2wN2xw8xjaUy5nSHqrznqDA== -"@metamask/controller-utils@^11.0.0", "@metamask/controller-utils@^11.0.2", "@metamask/controller-utils@^11.3.0", "@metamask/controller-utils@^11.4.2", "@metamask/controller-utils@^11.4.3": +"@metamask/controller-utils@^11.0.0", "@metamask/controller-utils@^11.3.0", "@metamask/controller-utils@^11.4.1", "@metamask/controller-utils@^11.4.2", "@metamask/controller-utils@^11.4.3": version "11.4.3" resolved "https://registry.yarnpkg.com/@metamask/controller-utils/-/controller-utils-11.4.3.tgz#5763f0bbee2f3770c1ba42dd4869786afef849bd" integrity sha512-shrVCHFwIbt8qVcKbxe/mp5tOxjz6905/7ZIAnwUJKHYv7iEqfjyO1ibPoOknrZCF2vbXtP21b435g3v9DBNTQ== @@ -4399,16 +4391,16 @@ ethereum-cryptography "^2.1.2" randombytes "^2.1.0" -"@metamask/eth-snap-keyring@^4.3.3": - version "4.3.6" - resolved "https://registry.yarnpkg.com/@metamask/eth-snap-keyring/-/eth-snap-keyring-4.3.6.tgz#c010c644575d1d2dd7c47953f6a1392fe17e38d9" - integrity sha512-jds0NdBDWM99FnO7WjODnRo+fnRoo11lJZlFS+cIa4ol7TMQmJ0HQdpno7R2LNfweoTioDMQd1LY1mCBq4zXnA== +"@metamask/eth-snap-keyring@^4.3.3", "@metamask/eth-snap-keyring@^4.3.6": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@metamask/eth-snap-keyring/-/eth-snap-keyring-4.4.0.tgz#118f292523bc7717b2782776b6728bcd2b862730" + integrity sha512-N9+RMYrzwBvQER5aGc6kDjUNJi2m2A5LNUNC51v9oSvpQ2igooHQa+SHAdTpuh/OZ/oL3gvQ5dqz3ugS50kXmQ== dependencies: "@ethereumjs/tx" "^4.2.0" "@metamask/eth-sig-util" "^7.0.3" - "@metamask/snaps-controllers" "^9.7.0" - "@metamask/snaps-sdk" "^6.5.1" - "@metamask/snaps-utils" "^7.8.1" + "@metamask/snaps-controllers" "^9.10.0" + "@metamask/snaps-sdk" "^6.7.0" + "@metamask/snaps-utils" "^8.3.0" "@metamask/superstruct" "^3.1.0" "@metamask/utils" "^9.2.1" "@types/uuid" "^9.0.8" @@ -4495,14 +4487,14 @@ bn.js "^5.2.1" uuid "^8.3.2" -"@metamask/json-rpc-engine@^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-10.0.0.tgz#d2beb23ca43596bf2e4a72c54c1d4c24fce1c8a6" - integrity sha512-10GzJR3G+MM1uS9tLEOw67fc8/kstCSwVoSqaL3fxYaWfUrM6RJWAq1jnMdVrLgyItDguC0d8fsW1FTmF856rQ== +"@metamask/json-rpc-engine@^10.0.0", "@metamask/json-rpc-engine@^10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-10.0.1.tgz#432e4b42770ecd4da8a89f94b52cdeac982bdca3" + integrity sha512-RmoKubUhK7BtZrllJjqMiSkW0p5QIKiO8ohJoa7/pewJIgPWzPFid/5EahQ4f/sPtTH9O9ypDQF9r7DFCPFSVQ== dependencies: - "@metamask/rpc-errors" "^7.0.0" + "@metamask/rpc-errors" "^7.0.1" "@metamask/safe-event-emitter" "^3.0.0" - "@metamask/utils" "^9.1.0" + "@metamask/utils" "^10.0.0" "@metamask/json-rpc-engine@^7.0.0": version "7.3.3" @@ -4541,14 +4533,14 @@ "@metamask/utils" "^8.3.0" readable-stream "^3.6.2" -"@metamask/json-rpc-middleware-stream@^8.0.1", "@metamask/json-rpc-middleware-stream@^8.0.2": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-8.0.2.tgz#2063b7775264d04fca8506844aebe3c3bf1fb443" - integrity sha512-8z7GAUYj3EFVkxiTjaND2x9Q8iURoKhwIyzLMZChLTiJ/XKRJwvtJ9cG2KIeL3GnNsPkVH97xngRmTaYAM6yDg== +"@metamask/json-rpc-middleware-stream@^8.0.1", "@metamask/json-rpc-middleware-stream@^8.0.2", "@metamask/json-rpc-middleware-stream@^8.0.5": + version "8.0.5" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-8.0.5.tgz#f91ba2ebc0285b2104f36e72359cc8ba33d08d75" + integrity sha512-g/1McYbBODSceBLA/rlSqzLyHcBCOsXok776Dh4PuCo5VjdLR11I24xPwR9VIdFVsrDd+MLH1q3xpS4loydLaw== dependencies: - "@metamask/json-rpc-engine" "^9.0.2" + "@metamask/json-rpc-engine" "^10.0.1" "@metamask/safe-event-emitter" "^3.0.0" - "@metamask/utils" "^9.1.0" + "@metamask/utils" "^10.0.0" readable-stream "^3.6.2" "@metamask/key-tree@^9.0.0", "@metamask/key-tree@^9.1.2": @@ -4574,7 +4566,7 @@ bech32 "^2.0.0" uuid "^9.0.1" -"@metamask/keyring-controller@^17.2.1", "@metamask/keyring-controller@^17.2.2": +"@metamask/keyring-controller@^17.2.2": version "17.3.1" resolved "https://registry.yarnpkg.com/@metamask/keyring-controller/-/keyring-controller-17.3.1.tgz#1a498dd165df5b908761e62fc9e194b8a4f9a074" integrity sha512-+R4tD0KtXjjAts5xOo+CKETPQVa+RJDC98L2qU2iGHyFKN05gFYt4M8HMcK4gq2GhGxm+0r6SYOUw2jK/wjD5g== @@ -4593,6 +4585,25 @@ ethereumjs-wallet "^1.0.1" immer "^9.0.6" +"@metamask/keyring-controller@^18.0.0": + version "18.0.0" + resolved "https://registry.yarnpkg.com/@metamask/keyring-controller/-/keyring-controller-18.0.0.tgz#48d5a441cd798cef840c5bf6334d53b6e37dc938" + integrity sha512-SIvjDUvt9U+fqge3ao0qZYfWrlBVf/NI/nFOwp9Q8IFpPsZYHKpbLahLfviunR/KItBul7vTzWBIN/FtQo/eLg== + dependencies: + "@ethereumjs/util" "^8.1.0" + "@keystonehq/metamask-airgapped-keyring" "^0.14.1" + "@metamask/base-controller" "^7.0.2" + "@metamask/browser-passworder" "^4.3.0" + "@metamask/eth-hd-keyring" "^7.0.4" + "@metamask/eth-sig-util" "^8.0.0" + "@metamask/eth-simple-keyring" "^6.0.5" + "@metamask/keyring-api" "^8.1.3" + "@metamask/message-manager" "^11.0.1" + "@metamask/utils" "^10.0.0" + async-mutex "^0.5.0" + ethereumjs-wallet "^1.0.1" + immer "^9.0.6" + "@metamask/logging-controller@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@metamask/logging-controller/-/logging-controller-6.0.1.tgz#cfe858e91ba6fa490ebcf4e50bebd5f6dee0417e" @@ -4724,16 +4735,16 @@ "@metamask/safe-event-emitter" "^3.0.0" readable-stream "^3.6.2" -"@metamask/permission-controller@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@metamask/permission-controller/-/permission-controller-11.0.0.tgz#b205b97cfa95921aa87ffb1d479c064e9baf8cc0" - integrity sha512-HuQy9nkHVRSp5+soYN3Ks8HRIPz8ISvtTmn7x3Q5anyF70S5mDVsviLryHePUYdO5s8C9VJtB82E7StilK7WWg== +"@metamask/permission-controller@^11.0.0", "@metamask/permission-controller@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@metamask/permission-controller/-/permission-controller-11.0.3.tgz#1d232ad892f9e097e281ddd7425370d3a6641344" + integrity sha512-u+btKRYRdJ+dBZP3nw1pmpo9bO4ehK6Lh0Veo0/Cx4ETvSN6JbP/L86aPRr/r8PAxXNrfSqv7YOgTfspw7cgCQ== dependencies: - "@metamask/base-controller" "^6.0.2" - "@metamask/controller-utils" "^11.0.2" - "@metamask/json-rpc-engine" "^9.0.2" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/utils" "^9.1.0" + "@metamask/base-controller" "^7.0.2" + "@metamask/controller-utils" "^11.4.1" + "@metamask/json-rpc-engine" "^10.0.1" + "@metamask/rpc-errors" "^7.0.1" + "@metamask/utils" "^10.0.0" "@types/deep-freeze-strict" "^1.1.0" deep-freeze-strict "^1.1.1" immer "^9.0.6" @@ -4858,6 +4869,23 @@ is-stream "^2.0.0" readable-stream "^3.6.2" +"@metamask/providers@^18.1.1": + version "18.1.1" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-18.1.1.tgz#f43aa71d9d936f31fc1dc3b343b0d24867129678" + integrity sha512-q2i4hsE87LhoTe62Zz81roFgelcr+SpHJwqDzEf/xFdObGUYcZ/HS6PG/lNywohMflaIM1DQ5GCW7V6JlZoEqw== + dependencies: + "@metamask/json-rpc-engine" "^10.0.1" + "@metamask/json-rpc-middleware-stream" "^8.0.5" + "@metamask/object-multiplex" "^2.0.0" + "@metamask/rpc-errors" "^7.0.1" + "@metamask/safe-event-emitter" "^3.1.1" + "@metamask/utils" "^10.0.0" + detect-browser "^5.2.0" + extension-port-stream "^4.1.0" + fast-deep-equal "^3.1.3" + is-stream "^2.0.0" + readable-stream "^3.6.2" + "@metamask/react-native-actionsheet@2.4.2": version "2.4.2" resolved "https://registry.yarnpkg.com/@metamask/react-native-actionsheet/-/react-native-actionsheet-2.4.2.tgz#9f956fe9e784d92c8e33656877fcfaabe4a482f1" @@ -4952,7 +4980,7 @@ lodash "^4.17.21" uuid "^8.3.2" -"@metamask/slip44@3.1.0", "@metamask/slip44@^3.1.0": +"@metamask/slip44@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@metamask/slip44/-/slip44-3.1.0.tgz#f8067796f89fbbd6eaa594660bd6a1fbd6837a51" integrity sha512-bFlJ8jhTYJ4iQ0zgh2WMO2615UJ4Ne5J831EjsqKYaZs3qd6UTw/cy76hAmSxhnBluNAH5S6zZzxESLrTitCmQ== @@ -4983,25 +5011,25 @@ fast-json-patch "^3.1.0" lodash "^4.17.21" -"@metamask/snaps-controllers@^9.7.0", "@metamask/snaps-controllers@^9.8.0": - version "9.11.0" - resolved "https://registry.yarnpkg.com/@metamask/snaps-controllers/-/snaps-controllers-9.11.0.tgz#06cd0976994bfa12413c1326b60d50afe6a65640" - integrity sha512-4LrwAGnYVL125OqC7TRCFLdxtTfZLUbw/xyL0h/VWeT1+wt8uc6imN7gVyCudxM6GY2ujLaBcyp0NvmLEDDrfQ== +"@metamask/snaps-controllers@^9.10.0", "@metamask/snaps-controllers@^9.8.0": + version "9.14.0" + resolved "https://registry.yarnpkg.com/@metamask/snaps-controllers/-/snaps-controllers-9.14.0.tgz#2642f897368014e8f5ab4e3f3e047e2c227c360b" + integrity sha512-OIo9SRKJvNwIkluLdes21Js/CY/HA7sIQnjwFuSHaBviESu4DEi1YbQsOJwt+Y5q0+dimF6rA9nTwAFI3eV9JA== dependencies: - "@metamask/approval-controller" "^7.0.2" - "@metamask/base-controller" "^6.0.2" - "@metamask/json-rpc-engine" "^9.0.2" - "@metamask/json-rpc-middleware-stream" "^8.0.2" + "@metamask/approval-controller" "^7.1.1" + "@metamask/base-controller" "^7.0.2" + "@metamask/json-rpc-engine" "^10.0.1" + "@metamask/json-rpc-middleware-stream" "^8.0.5" "@metamask/object-multiplex" "^2.0.0" - "@metamask/permission-controller" "^11.0.0" + "@metamask/permission-controller" "^11.0.3" "@metamask/phishing-controller" "^12.0.2" "@metamask/post-message-stream" "^8.1.1" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/snaps-registry" "^3.2.1" - "@metamask/snaps-rpc-methods" "^11.4.0" - "@metamask/snaps-sdk" "^6.8.0" - "@metamask/snaps-utils" "^8.4.0" - "@metamask/utils" "^9.2.1" + "@metamask/rpc-errors" "^7.0.1" + "@metamask/snaps-registry" "^3.2.2" + "@metamask/snaps-rpc-methods" "^11.6.0" + "@metamask/snaps-sdk" "^6.12.0" + "@metamask/snaps-utils" "^8.6.0" + "@metamask/utils" "^10.0.0" "@xstate/fsm" "^2.0.0" browserify-zlib "^0.2.0" concat-stream "^2.0.0" @@ -5011,6 +5039,7 @@ nanoid "^3.1.31" readable-stream "^3.6.2" readable-web-to-node-stream "^3.0.2" + semver "^7.5.4" tar-stream "^3.1.7" "@metamask/snaps-execution-environments@^6.7.2": @@ -5030,28 +5059,28 @@ nanoid "^3.1.31" readable-stream "^3.6.2" -"@metamask/snaps-registry@^3.2.1": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@metamask/snaps-registry/-/snaps-registry-3.2.1.tgz#ff97329b97e8dc9a512f0c5f0f41b3554a592ad3" - integrity sha512-MnG1BBJk4UK9iJArK+h/iz8wlt+xjsvgnj0k39p5658hWZu6cuumHoV1EIupCwsCv7XXOBLc8iAgjvITXKC1FQ== +"@metamask/snaps-registry@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@metamask/snaps-registry/-/snaps-registry-3.2.2.tgz#c0402e7beeb3fbaaeb829a508c2277bd7e4a1622" + integrity sha512-20JqmfqAMcQgdR0rkWqLdiWoZYtMNhqzAUs64sO7jMBG0dBUYI+ktatH3ZlLLILqrOPumDDv+Goj7DozXLf33g== dependencies: "@metamask/superstruct" "^3.1.0" - "@metamask/utils" "^9.0.0" + "@metamask/utils" "^10.0.0" "@noble/curves" "^1.2.0" "@noble/hashes" "^1.3.2" -"@metamask/snaps-rpc-methods@^11.1.1", "@metamask/snaps-rpc-methods@^11.4.0": - version "11.4.0" - resolved "https://registry.yarnpkg.com/@metamask/snaps-rpc-methods/-/snaps-rpc-methods-11.4.0.tgz#6cbf6cd6d91b65a5156882b4c10b1bdbc026e4cc" - integrity sha512-vFX4NFV1y7sj7uCDH6lJdDbRSLhELQdrv1FM0x/S8UptKYLGMhKafplhfx7KcQm0DBugSIXd42rmpgE8addunQ== +"@metamask/snaps-rpc-methods@^11.1.1", "@metamask/snaps-rpc-methods@^11.6.0": + version "11.6.0" + resolved "https://registry.yarnpkg.com/@metamask/snaps-rpc-methods/-/snaps-rpc-methods-11.6.0.tgz#6d056305280b519dcea19d23bdb5a09745ecc8cf" + integrity sha512-6PezOauAr/c0XxZ3NWo0dX3nL5RyYO2lpvZZkOwuXZOSIgGxzzGc9i2yhKZjpWusPeANjxONc5qopN9fM+IbKg== dependencies: "@metamask/key-tree" "^9.1.2" - "@metamask/permission-controller" "^11.0.0" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/snaps-sdk" "^6.8.0" - "@metamask/snaps-utils" "^8.4.0" + "@metamask/permission-controller" "^11.0.3" + "@metamask/rpc-errors" "^7.0.1" + "@metamask/snaps-sdk" "^6.12.0" + "@metamask/snaps-utils" "^8.6.0" "@metamask/superstruct" "^3.1.0" - "@metamask/utils" "^9.2.1" + "@metamask/utils" "^10.0.0" "@noble/hashes" "^1.3.1" "@metamask/snaps-sdk@^3.1.1": @@ -5066,62 +5095,33 @@ fast-xml-parser "^4.3.4" superstruct "^1.0.3" -"@metamask/snaps-sdk@^6.1.0", "@metamask/snaps-sdk@^6.5.0", "@metamask/snaps-sdk@^6.5.1", "@metamask/snaps-sdk@^6.8.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@metamask/snaps-sdk/-/snaps-sdk-6.9.0.tgz#409a36cdecf46da4825c437091c9d1541bea7bce" - integrity sha512-wPiZNvmkUXTGJ5yLIN9s+KZuB9zx4bz5LurUpufQ8geaMenQ2ZSyg8vqx7hj25q3yk3W2KncV3wnBmtixjucRA== - dependencies: - "@metamask/key-tree" "^9.1.2" - "@metamask/providers" "^17.1.2" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/superstruct" "^3.1.0" - "@metamask/utils" "^9.2.1" - -"@metamask/snaps-utils@^7.8.1": - version "7.8.1" - resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-7.8.1.tgz#d18f56ece8a1d4e9ff2e8e7645c3349cf08937bc" - integrity sha512-v0xNoiWeJGHvtJqP0aU5dj+phqpV6vKCJoV5tNBXl8/AvMTaV2YL4SLO/z+PTo0RWZFplgAuuDsY254kAXi9Fw== +"@metamask/snaps-sdk@^6.11.0", "@metamask/snaps-sdk@^6.12.0", "@metamask/snaps-sdk@^6.5.0", "@metamask/snaps-sdk@^6.5.1", "@metamask/snaps-sdk@^6.7.0": + version "6.12.0" + resolved "https://registry.yarnpkg.com/@metamask/snaps-sdk/-/snaps-sdk-6.12.0.tgz#e609dd98b14bb33b55c6327fa94d9d1e768fe40d" + integrity sha512-6YHLKJFDaRLrnBMaFsv9xEEoZlibmBTyxV4S6z7U6zxfxknxOW2SI5tAiuz3e5TjD/p3F5siJYNsrRgnOEgxAA== dependencies: - "@babel/core" "^7.23.2" - "@babel/types" "^7.23.0" - "@metamask/base-controller" "^6.0.2" "@metamask/key-tree" "^9.1.2" - "@metamask/permission-controller" "^11.0.0" - "@metamask/rpc-errors" "^6.3.1" - "@metamask/slip44" "^3.1.0" - "@metamask/snaps-registry" "^3.2.1" - "@metamask/snaps-sdk" "^6.1.0" + "@metamask/providers" "^18.1.1" + "@metamask/rpc-errors" "^7.0.1" "@metamask/superstruct" "^3.1.0" - "@metamask/utils" "^9.1.0" - "@noble/hashes" "^1.3.1" - "@scure/base" "^1.1.1" - chalk "^4.1.2" - cron-parser "^4.5.0" - fast-deep-equal "^3.1.3" - fast-json-stable-stringify "^2.1.0" - fast-xml-parser "^4.3.4" - marked "^12.0.1" - rfdc "^1.3.0" - semver "^7.5.4" - ses "^1.1.0" - validate-npm-package-name "^5.0.0" + "@metamask/utils" "^10.0.0" -"@metamask/snaps-utils@^8.1.1", "@metamask/snaps-utils@^8.4.0": - version "8.4.0" - resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-8.4.0.tgz#aefedf45e6fe7b87a6b646193b7c0150caa5e51d" - integrity sha512-xxrAsxKf+l8Z3RP9oriNp6Jboh2tUB3mYZDw/kAvzBRX0tr28KgU/sKhRj4jF8GHEL7/jJmw9OIwOlhuXxD+Kg== +"@metamask/snaps-utils@^8.1.1", "@metamask/snaps-utils@^8.3.0", "@metamask/snaps-utils@^8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-8.6.0.tgz#96e4b3fbca8109d5335502ad1d71e8b6ec06765a" + integrity sha512-Q+CmJ5pbSj3USeDTsPnJBJ27qSWAYGlYAC6M2NTe/0OmGUFPx4V54kT2HCc/97AOG6fChSeLqfF3KpTtFuaiAQ== dependencies: "@babel/core" "^7.23.2" "@babel/types" "^7.23.0" - "@metamask/base-controller" "^6.0.2" + "@metamask/base-controller" "^7.0.2" "@metamask/key-tree" "^9.1.2" - "@metamask/permission-controller" "^11.0.0" - "@metamask/rpc-errors" "^6.3.1" + "@metamask/permission-controller" "^11.0.3" + "@metamask/rpc-errors" "^7.0.1" "@metamask/slip44" "^4.0.0" - "@metamask/snaps-registry" "^3.2.1" - "@metamask/snaps-sdk" "^6.8.0" + "@metamask/snaps-registry" "^3.2.2" + "@metamask/snaps-sdk" "^6.11.0" "@metamask/superstruct" "^3.1.0" - "@metamask/utils" "^9.2.1" + "@metamask/utils" "^10.0.0" "@noble/hashes" "^1.3.1" "@scure/base" "^1.1.1" chalk "^4.1.2" From a7968b4a781a05ece7428119b77d4d2cefc19609 Mon Sep 17 00:00:00 2001 From: cryptodev-2s <109512101+cryptodev-2s@users.noreply.github.com> Date: Thu, 28 Nov 2024 01:24:13 +0100 Subject: [PATCH 7/8] chore: bump `@metamask/preferences-controller` to `^14.0.0` (#12472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR bumps `@metamask/preferences-controller` to `^14.0.0` ## **Related issues** Fixes: https://github.com/MetaMask/metamask-mobile/issues/12305 ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- package.json | 2 +- ...h => @metamask+preferences-controller+14.0.0.patch} | 0 yarn.lock | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) rename patches/{@metamask+preferences-controller+13.3.0.patch => @metamask+preferences-controller+14.0.0.patch} (100%) diff --git a/package.json b/package.json index 53bfadecdfe..c3dc8231ab5 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "@metamask/phishing-controller": "^12.0.3", "@metamask/post-message-stream": "^8.0.0", "@metamask/ppom-validator": "0.35.1", - "@metamask/preferences-controller": "^13.3.0", + "@metamask/preferences-controller": "^14.0.0", "@metamask/profile-sync-controller": "^0.9.7", "@metamask/react-native-actionsheet": "2.4.2", "@metamask/react-native-button": "^3.0.0", diff --git a/patches/@metamask+preferences-controller+13.3.0.patch b/patches/@metamask+preferences-controller+14.0.0.patch similarity index 100% rename from patches/@metamask+preferences-controller+13.3.0.patch rename to patches/@metamask+preferences-controller+14.0.0.patch diff --git a/yarn.lock b/yarn.lock index ed2d678d30d..5440abc24cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4810,13 +4810,13 @@ eslint-plugin-n "^16.6.2" json-rpc-random-id "^1.0.1" -"@metamask/preferences-controller@^13.3.0": - version "13.3.0" - resolved "https://registry.yarnpkg.com/@metamask/preferences-controller/-/preferences-controller-13.3.0.tgz#5c10001148dc335d8dcc3e3118154961b1a2f377" - integrity sha512-USPwqvCxk9C4GlpZRrd9hYhpZz2vpBl8S6TyJQeX0maY2m+vrbahhUukq/6zPWJEjkthqKe8Ndu5KKKCXv1Fyg== +"@metamask/preferences-controller@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@metamask/preferences-controller/-/preferences-controller-14.0.0.tgz#1ec10cf7d2091962345dfc99fa050339a997e467" + integrity sha512-rh0kWWIDCa1V/zAfC3pA+0I3JSiQp23kpi838uMqCDMBIB0ifFbWX+qjnZlxZp77R1bvJiSqtHGlYLl60/Y7FA== dependencies: "@metamask/base-controller" "^7.0.2" - "@metamask/controller-utils" "^11.4.2" + "@metamask/controller-utils" "^11.4.3" "@metamask/profile-sync-controller@^0.9.7": version "0.9.7" From 2327799ee7236098a3812e21bb580c7c8c4241bd Mon Sep 17 00:00:00 2001 From: cryptodev-2s <109512101+cryptodev-2s@users.noreply.github.com> Date: Thu, 28 Nov 2024 01:25:09 +0100 Subject: [PATCH 8/8] chore: bump `@metamask/signature-controller` to `^22.0.0` (#12474) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR bumps `@metamask/signature-controller` to `^22.0.0` ## **Related issues** Fixes: https://github.com/MetaMask/metamask-mobile/issues/12307 ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c3dc8231ab5..9f4f42fd0b2 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "@metamask/scure-bip39": "^2.1.0", "@metamask/sdk-communication-layer": "0.29.0-wallet", "@metamask/selected-network-controller": "^18.0.2", - "@metamask/signature-controller": "^21.0.0", + "@metamask/signature-controller": "^22.0.0", "@metamask/slip44": "3.1.0", "@metamask/smart-transactions-controller": "^14.0.0", "@metamask/snaps-controllers": "^9.8.0", diff --git a/yarn.lock b/yarn.lock index 5440abc24cd..65dab65a97d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4967,13 +4967,13 @@ "@metamask/swappable-obj-proxy" "^2.2.0" "@metamask/utils" "^9.1.0" -"@metamask/signature-controller@^21.0.0": - version "21.1.0" - resolved "https://registry.yarnpkg.com/@metamask/signature-controller/-/signature-controller-21.1.0.tgz#04b164dc0dfaeee0bf77d1be50b5f9be39c8c334" - integrity sha512-WD99N98DUio/Ya21tQtRV8IXAvdoakXL0icFoBir8Dnv4ZuAwFkb5TbalhWfhyAA2rwED2amTbAmIrzcvXMagw== +"@metamask/signature-controller@^22.0.0": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@metamask/signature-controller/-/signature-controller-22.0.0.tgz#a52c79881aae4b47fecfc2c2b1f2d0e1e649e240" + integrity sha512-k4Kvq4tdFDWLiFiNijUeOGVQj10PfNp5R6DCPXwMgQnJqmUBXM14i/kMN4lU7rRsieYhQdXRVOQZ3/5r3wCstg== dependencies: "@metamask/base-controller" "^7.0.2" - "@metamask/controller-utils" "^11.4.2" + "@metamask/controller-utils" "^11.4.3" "@metamask/eth-sig-util" "^8.0.0" "@metamask/utils" "^10.0.0" jsonschema "^1.2.4"