From a0ec48b4fe4ef7d20d744b80f3e1b88a7e50c39a Mon Sep 17 00:00:00 2001 From: salimtb Date: Fri, 20 Dec 2024 14:24:43 +0100 Subject: [PATCH] fix: fix unit tests --- .../tests/SelectedNetworkController.test.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/selected-network-controller/tests/SelectedNetworkController.test.ts b/packages/selected-network-controller/tests/SelectedNetworkController.test.ts index fd975016ca..06c5da3feb 100644 --- a/packages/selected-network-controller/tests/SelectedNetworkController.test.ts +++ b/packages/selected-network-controller/tests/SelectedNetworkController.test.ts @@ -415,7 +415,7 @@ describe('SelectedNetworkController', () => { it('redirects domains when the default rpc endpoint is switched', () => { const initialDomains = { 'different-chain.com': 'mainnet', - 'chain-with-new-default.com': 'goerli', + 'chain-with-new-default.com': 'sepolia', }; const { controller, messenger, mockNetworkControllerGetState } = setup({ @@ -424,11 +424,11 @@ describe('SelectedNetworkController', () => { }); const networkControllerState = getDefaultNetworkControllerState(); - const goerliNetwork = - networkControllerState.networkConfigurationsByChainId['0x5']; + const sepoliaNetwork = + networkControllerState.networkConfigurationsByChainId['0xaa36a7']; - goerliNetwork.defaultRpcEndpointIndex = - goerliNetwork.rpcEndpoints.push({ + sepoliaNetwork.defaultRpcEndpointIndex = + sepoliaNetwork.rpcEndpoints.push({ type: RpcEndpointType.Custom, url: 'https://new-default.com', networkClientId: 'new-default-network-client-id', @@ -444,7 +444,7 @@ describe('SelectedNetworkController', () => { [ { op: 'replace', - path: ['networkConfigurationsByChainId', '0x5'], + path: ['networkConfigurationsByChainId', '0xaa36a7'], }, ], ); @@ -458,7 +458,7 @@ describe('SelectedNetworkController', () => { it('redirects domains when the default rpc endpoint is deleted and replaced', () => { const initialDomains = { 'different-chain.com': 'mainnet', - 'chain-with-new-default.com': 'goerli', + 'chain-with-new-default.com': 'sepolia', }; const { controller, messenger, mockNetworkControllerGetState } = setup({ @@ -467,10 +467,10 @@ describe('SelectedNetworkController', () => { }); const networkControllerState = getDefaultNetworkControllerState(); - const goerliNetwork = - networkControllerState.networkConfigurationsByChainId['0x5']; + const sepoliaNetwork = + networkControllerState.networkConfigurationsByChainId['0xaa36a7']; - goerliNetwork.rpcEndpoints = [ + sepoliaNetwork.rpcEndpoints = [ { type: RpcEndpointType.Custom, url: 'https://new-default.com', @@ -488,7 +488,7 @@ describe('SelectedNetworkController', () => { [ { op: 'replace', - path: ['networkConfigurationsByChainId', '0x5'], + path: ['networkConfigurationsByChainId', '0xaa36a7'], }, ], );