diff --git a/packages/examples/packages/ethereum-provider/src/index.test.ts b/packages/examples/packages/ethereum-provider/src/index.test.ts index 44a706c97c..b2d025e7e8 100644 --- a/packages/examples/packages/ethereum-provider/src/index.test.ts +++ b/packages/examples/packages/ethereum-provider/src/index.test.ts @@ -45,14 +45,7 @@ describe('onRpcRequest', () => { const MOCK_VERSION = '1'; // Ethereum Mainnet it('returns the current network version', async () => { - const { request, mockJsonRpc } = await installSnap(); - - // To avoid relying on the network, we mock the response from the Ethereum - // provider. - mockJsonRpc({ - method: 'net_version', - result: MOCK_VERSION, - }); + const { request } = await installSnap(); const response = await request({ method: 'getVersion', diff --git a/packages/snaps-simulation/src/middleware/internal-methods/net-version.test.ts b/packages/snaps-simulation/src/middleware/internal-methods/net-version.test.ts index 7a89fe8b4c..0bd6d22c6f 100644 --- a/packages/snaps-simulation/src/middleware/internal-methods/net-version.test.ts +++ b/packages/snaps-simulation/src/middleware/internal-methods/net-version.test.ts @@ -23,6 +23,6 @@ describe('getNetworkVersionHandler', () => { ); expect(end).toHaveBeenCalled(); - expect(result.result).toBe('0x01'); + expect(result.result).toBe('1'); }); }); diff --git a/packages/snaps-simulation/src/middleware/internal-methods/net-version.ts b/packages/snaps-simulation/src/middleware/internal-methods/net-version.ts index fd8a56a1f2..0c3a337d3c 100644 --- a/packages/snaps-simulation/src/middleware/internal-methods/net-version.ts +++ b/packages/snaps-simulation/src/middleware/internal-methods/net-version.ts @@ -28,7 +28,7 @@ export async function getNetworkVersionHandler( ) { // For now this will return a mocked result, this should probably match // whatever network the simulation is using. - response.result = '0x01'; + response.result = '1'; return end(); }