Skip to content

Commit

Permalink
Merge branch 'main' into naugtur/lavamoat-policy-diff-friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
naugtur committed Dec 18, 2024
2 parents e510fde + c4429bc commit dafc9b4
Show file tree
Hide file tree
Showing 56 changed files with 13,878 additions and 13,910 deletions.
2 changes: 1 addition & 1 deletion app/scripts/controllers/account-tracker-controller.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import EventEmitter from 'events';
import { ControllerMessenger } from '@metamask/base-controller';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { BlockTracker, Provider } from '@metamask/network-controller';

import { flushPromises } from '../../../test/lib/timer-helpers';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/account-tracker-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
AccountsControllerSelectedEvmAccountChangeEvent,
} from '@metamask/accounts-controller';
import { KeyringControllerAccountRemovedEvent } from '@metamask/keyring-controller';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';

import { LOCALHOST_RPC_URL } from '../../../shared/constants/network';
import { SINGLE_CALL_BALANCES_ADDRESSES } from '../constants/contracts';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/metametrics-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Token,
TokensControllerState,
} from '@metamask/assets-controllers';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { Browser } from 'webextension-polyfill';
import { ControllerMessenger } from '@metamask/base-controller';
import { merge } from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/mmi-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
OriginalRequest,
SignatureController,
} from '@metamask/signature-controller';
import { InternalAccount } from '@metamask/keyring-api';
import { toHex } from '@metamask/controller-utils';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils';
// TODO: Remove restricted import
// eslint-disable-next-line import/no-restricted-paths
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/controllers/permissions/specifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const CaveatFactories = Object.freeze({
* PermissionController.
*
* @param {{
* getInternalAccounts: () => Record<string, import('@metamask/keyring-api').InternalAccount>,
* getInternalAccounts: () => Record<string, import('@metamask/keyring-internal-api').InternalAccount>,
* }} options - Options bag.
*/
export const getCaveatSpecifications = ({
Expand Down Expand Up @@ -96,7 +96,7 @@ export const getCaveatSpecifications = ({
*
* @param {{
* getAllAccounts: () => Promise<string[]>,
* getInternalAccounts: () => Record<string, import('@metamask/keyring-api').InternalAccount>,
* getInternalAccounts: () => Record<string, import('@metamask/keyring-internal-api').InternalAccount>,
* }} options - Options bag.
* @param options.getAllAccounts - A function that returns all Ethereum accounts
* in the current MetaMask instance.
Expand Down Expand Up @@ -254,7 +254,7 @@ export const getPermissionSpecifications = ({
* corresponds to a PreferencesController identity.
*
* @param {string[]} accounts - The accounts associated with the caveat.
* @param {() => Record<string, import('@metamask/keyring-api').InternalAccount>} getInternalAccounts -
* @param {() => Record<string, import('@metamask/keyring-internal-api').InternalAccount>} getInternalAccounts -
* Gets all AccountsController InternalAccounts.
*/
function validateCaveatAccounts(accounts, getInternalAccounts) {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/lib/AccountIdentitiesPetnamesBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
NameType,
NameOrigin,
} from '@metamask/name-controller';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import {
AccountsControllerChangeEvent,
AccountsControllerListAccountsAction,
Expand Down
8 changes: 2 additions & 6 deletions app/scripts/lib/accounts/BalancesController.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { ControllerMessenger } from '@metamask/base-controller';
import {
Balance,
BtcAccountType,
CaipAssetType,
InternalAccount,
} from '@metamask/keyring-api';
import { Balance, BtcAccountType, CaipAssetType } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { createMockInternalAccount } from '../../../../test/jest/mocks';
import { MultichainNetworks } from '../../../../shared/constants/multichain/networks';
import {
Expand Down
8 changes: 4 additions & 4 deletions app/scripts/lib/accounts/BalancesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import {
} from '@metamask/base-controller';
import {
BtcAccountType,
KeyringClient,
SolAccountType,
isEvmAccountType,
type Balance,
type CaipAssetType,
type InternalAccount,
isEvmAccountType,
SolAccountType,
} from '@metamask/keyring-api';
import { type InternalAccount } from '@metamask/keyring-internal-api';
import { KeyringClient } from '@metamask/keyring-snap-client';
import type { HandleSnapRequest } from '@metamask/snaps-controllers';
import type { SnapId } from '@metamask/snaps-sdk';
import { HandlerType } from '@metamask/snaps-utils';
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/lib/snap-keyring/snap-keyring.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ControllerMessenger } from '@metamask/base-controller';
import { EthAccountType, InternalAccount } from '@metamask/keyring-api';
import { EthAccountType } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES } from '../../../../shared/constants/app';
import {
MetaMetricsEventCategory,
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/lib/transaction/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { TransactionParams } from '@metamask/eth-json-rpc-middleware';
import {
TransactionController,
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/lib/transaction/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EthAccountType, InternalAccount } from '@metamask/keyring-api';
import { EthAccountType } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import {
TransactionController,
TransactionMeta,
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/migrations/105.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { v4 as uuid } from 'uuid';
import { sha256FromString } from 'ethereumjs-util';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { ETH_EOA_METHODS } from '../../../shared/constants/eth-methods';
import { migrate } from './105';

Expand Down
3 changes: 2 additions & 1 deletion app/scripts/migrations/105.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EthAccountType, InternalAccount } from '@metamask/keyring-api';
import { EthAccountType } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';
import { sha256FromString } from 'ethereumjs-util';
import { v4 as uuid } from 'uuid';
import { cloneDeep } from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/migrations/119.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cloneDeep, isObject } from 'lodash';
import { hasProperty } from '@metamask/utils';
import { AccountsControllerState } from '@metamask/accounts-controller';
import { InternalAccount } from '@metamask/keyring-api';
import { InternalAccount } from '@metamask/keyring-internal-api';

type VersionedData = {
meta: { version: number };
Expand Down
Loading

0 comments on commit dafc9b4

Please sign in to comment.