From 437f788c3adf60ddeeb71aaca26a1540757335c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Manuel=20Mari=C3=B1as=20Bascoy?= Date: Thu, 29 Feb 2024 12:36:45 +0100 Subject: [PATCH] test: fix failin test in context.test.ts --- sdk/test/unit/context.test.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sdk/test/unit/context.test.ts b/sdk/test/unit/context.test.ts index 4c5ca332..af8edd36 100644 --- a/sdk/test/unit/context.test.ts +++ b/sdk/test/unit/context.test.ts @@ -284,19 +284,12 @@ describe('Context instances', () => { for (const provider of context.web3Providers) { expect(provider).toBeInstanceOf(JsonRpcProvider); expect(provider.connection.url).toBe('https://goerli.base.org/'); - provider - .getNetwork() - .then(nw => { - expect(nw.chainId).toEqual(84531); - expect(nw.name).toEqual('baseGoerli'); - expect(nw.ensAddress).toEqual( - LIVE_CONTRACTS[SupportedVersion.LATEST].baseGoerli - .ensRegistryAddress - ); - }) - .catch(err => { - throw err; - }); + const network = provider.network; + expect(network.chainId).toEqual(84531); + expect(network.name).toEqual('baseGoerli'); + expect(network.ensAddress).toEqual( + LIVE_CONTRACTS[SupportedVersion.LATEST].baseGoerli.ensRegistryAddress + ); } }); });