Skip to content

Commit 7d41f60

Browse files
committed
fix: improve multichain scope import
1 parent a00932d commit 7d41f60

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
TrxAccountType,
1311
TrxMethod,
@@ -25,6 +23,7 @@ import {
2523
import { MetaMaskReduxState } from '../../ui/store/store';
2624
import mockState from '../data/mock-state.json';
2725
import { isBtcMainnetAddress } from '../../shared/lib/multichain/accounts';
26+
import { MultichainNetworks } from '../../shared/constants/multichain/networks';
2827

2928
export type MockState = typeof mockState;
3029

@@ -243,12 +242,12 @@ export function createMockInternalAccount({
243242
// If no address is given, we fallback to testnet
244243
const isMainnet = Boolean(address) && isBtcMainnetAddress(address);
245244

246-
scopes = [isMainnet ? BtcScope.Mainnet : BtcScope.Testnet];
245+
scopes = [isMainnet ? MultichainNetworks.BITCOIN : MultichainNetworks.BITCOIN_TESTNET];
247246
methods = Object.values(BtcMethod);
248247
break;
249248
}
250249
case SolAccountType.DataAccount:
251-
scopes = [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet];
250+
scopes = [MultichainNetworks.SOLANA, MultichainNetworks.SOLANA_TESTNET, MultichainNetworks.SOLANA_DEVNET];
252251
methods = [SolMethod.SendAndConfirmTransaction];
253252
break;
254253
case TrxAccountType.Eoa:

0 commit comments

Comments
 (0)