diff --git a/packages/get-starknet/src/rpcs/index.ts b/packages/get-starknet/src/rpcs/index.ts index bb14057d..ae34160d 100644 --- a/packages/get-starknet/src/rpcs/index.ts +++ b/packages/get-starknet/src/rpcs/index.ts @@ -1,2 +1,3 @@ export * from './switch-network'; export * from './supported-specs'; +export * from './request-chain-id'; diff --git a/packages/get-starknet/src/rpcs/request-chain-id.test.ts b/packages/get-starknet/src/rpcs/request-chain-id.test.ts index c47e4f47..4294e9fe 100644 --- a/packages/get-starknet/src/rpcs/request-chain-id.test.ts +++ b/packages/get-starknet/src/rpcs/request-chain-id.test.ts @@ -2,12 +2,12 @@ import { mockWalletInit, createWallet, SepoliaNetwork } from '../__tests__/helpe import { WalletRequestChainId } from './request-chain-id'; describe('WalletRequestChainId', () => { - it('switchs the network', async () => { + it('returns the current chain Id', async () => { const wallet = createWallet(); mockWalletInit({ currentNetwork: SepoliaNetwork }); - const walletSwitchStarknetChain = new WalletRequestChainId(wallet); - const result = await walletSwitchStarknetChain.execute(); + const walletRequestChainId = new WalletRequestChainId(wallet); + const result = await walletRequestChainId.execute(); expect(result).toBe(SepoliaNetwork.chainId); }); diff --git a/packages/get-starknet/src/wallet.ts b/packages/get-starknet/src/wallet.ts index 49eb4c73..541e2d31 100644 --- a/packages/get-starknet/src/wallet.ts +++ b/packages/get-starknet/src/wallet.ts @@ -6,8 +6,7 @@ import { Provider } from 'starknet'; import { MetaMaskAccount } from './accounts'; import { RpcMethod, WalletIconMetaData } from './constants'; -import { WalletSupportedSpecs, WalletSwitchStarknetChain } from './rpcs'; -import { WalletRequestChainId } from './rpcs/request-chain-id'; +import { WalletSupportedSpecs, WalletSwitchStarknetChain, WalletRequestChainId } from './rpcs'; import { MetaMaskSigner } from './signer'; import { MetaMaskSnap } from './snap'; import type { MetaMaskProvider, Network } from './type';