Skip to content

Commit 26b10f2

Browse files
committed
fix: improve multichain scope import
1 parent 74e5896 commit 26b10f2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/jest/mocks.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import {
55
BtcAccountType,
66
isEvmAccountType,
77
EthScope,
8-
BtcScope,
98
SolAccountType,
10-
SolScope,
119
SolMethod,
1210
} from '@metamask/keyring-api';
1311
import { InternalAccount } from '@metamask/keyring-internal-api';
@@ -23,6 +21,7 @@ import {
2321
import { MetaMaskReduxState } from '../../ui/store/store';
2422
import mockState from '../data/mock-state.json';
2523
import { isBtcMainnetAddress } from '../../shared/lib/multichain/accounts';
24+
import { MultichainNetworks } from '../../shared/constants/multichain/networks';
2625

2726
export type MockState = typeof mockState;
2827

@@ -241,12 +240,12 @@ export function createMockInternalAccount({
241240
// If no address is given, we fallback to testnet
242241
const isMainnet = Boolean(address) && isBtcMainnetAddress(address);
243242

244-
scopes = [isMainnet ? BtcScope.Mainnet : BtcScope.Testnet];
243+
scopes = [isMainnet ? MultichainNetworks.BITCOIN : MultichainNetworks.BITCOIN_TESTNET];
245244
methods = Object.values(BtcMethod);
246245
break;
247246
}
248247
case SolAccountType.DataAccount:
249-
scopes = [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet];
248+
scopes = [MultichainNetworks.SOLANA, MultichainNetworks.SOLANA_TESTNET, MultichainNetworks.SOLANA_DEVNET];
250249
methods = [SolMethod.SendAndConfirmTransaction];
251250
break;
252251
default:

0 commit comments

Comments
 (0)