Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"@metamask/eth-json-rpc-provider": "^4.1.6",
"@metamask/ethjs-provider-http": "^0.3.0",
"@metamask/gas-fee-controller": "^22.0.1",
"@metamask/keyring-api": "^10.1.0",
"@metamask/network-controller": "^22.0.2",
"@types/bn.js": "^5.1.5",
"@types/jest": "^27.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
import type { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider';
import EthQuery from '@metamask/eth-query';
import HttpProvider from '@metamask/ethjs-provider-http';
import type { InternalAccount } from '@metamask/keyring-api';
import { EthAccountType } from '@metamask/keyring-api';
import type {
BlockTracker,
NetworkClientConfiguration,
Expand Down Expand Up @@ -71,6 +69,7 @@ import type {
GasFeeFlow,
GasFeeFlowResponse,
SubmitHistoryEntry,
InternalAccount,
} from './types';
import {
GasFeeEstimateType,
Expand Down Expand Up @@ -399,10 +398,11 @@ const MOCK_LINEA_GOERLI_NETWORK: MockNetwork = {
};

const ACCOUNT_MOCK = '0x6bf137f335ea1b8f193b8f6ea92561a60d23a207';
const INTERNAL_ACCOUNT_MOCK = {

const INTERNAL_ACCOUNT_MOCK: InternalAccount = {
id: '58def058-d35f-49a1-a7ab-e2580565f6f5',
address: ACCOUNT_MOCK,
type: EthAccountType.Eoa,
type: 'eip155:eoa',
options: {},
methods: [],
metadata: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
InfuraNetworkType,
NetworkType,
} from '@metamask/controller-utils';
import type { InternalAccount } from '@metamask/keyring-api';
import { EthAccountType, EthMethod } from '@metamask/keyring-api';
import {
NetworkController,
NetworkClientType,
Expand Down Expand Up @@ -61,7 +59,7 @@ import type {
TransactionControllerOptions,
} from './TransactionController';
import { TransactionController } from './TransactionController';
import type { TransactionMeta } from './types';
import type { InternalAccount, TransactionMeta } from './types';
import { TransactionStatus, TransactionType } from './types';
import { getEtherscanApiHost } from './utils/etherscan';
import * as etherscanUtils from './utils/etherscan';
Expand Down Expand Up @@ -104,22 +102,15 @@ const createMockInternalAccount = ({
id,
address,
options: {},
methods: [
EthMethod.PersonalSign,
EthMethod.Sign,
EthMethod.SignTransaction,
EthMethod.SignTypedDataV1,
EthMethod.SignTypedDataV3,
EthMethod.SignTypedDataV4,
],
type: EthAccountType.Eoa,
methods: [],
type: 'eip155:eoa',
metadata: {
name,
keyring: { type: 'HD Key Tree' },
importTime,
lastSelected,
},
} as InternalAccount;
};
};

const ACCOUNT_MOCK = '0x6bf137f335ea1b8f193b8f6ea92561a60d23a207';
Expand Down
5 changes: 5 additions & 0 deletions packages/transaction-controller/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { AccessList } from '@ethereumjs/tx';
import type { AccountsController } from '@metamask/accounts-controller';
import type EthQuery from '@metamask/eth-query';
import type { GasFeeState } from '@metamask/gas-fee-controller';
import type { NetworkClientId, Provider } from '@metamask/network-controller';
Expand Down Expand Up @@ -1344,3 +1345,7 @@ export type SubmitHistoryEntry = {
/** The transaction parameters that were submitted. */
transaction: TransactionParams;
};

export type InternalAccount = ReturnType<
AccountsController['getSelectedAccount']
>;
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3684,7 +3684,6 @@ __metadata:
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/ethjs-provider-http": "npm:^0.3.0"
"@metamask/gas-fee-controller": "npm:^22.0.1"
"@metamask/keyring-api": "npm:^10.1.0"
"@metamask/metamask-eth-abis": "npm:^3.1.1"
"@metamask/network-controller": "npm:^22.0.2"
"@metamask/nonce-tracker": "npm:^6.0.0"
Expand Down
Loading