From 3bccc4d9f0e07d42a3855891cb5b4efce3692001 Mon Sep 17 00:00:00 2001 From: Petar Penovic Date: Mon, 13 Nov 2023 06:18:33 +0100 Subject: [PATCH] fix: skip chainId eager load for RpcProvider initialization --- src/provider/rpc.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/provider/rpc.ts b/src/provider/rpc.ts index 44a535b70..a81680b32 100644 --- a/src/provider/rpc.ts +++ b/src/provider/rpc.ts @@ -85,8 +85,7 @@ export class RpcProvider implements ProviderInterface { this.retries = retries || defaultOptions.retries; this.headers = { ...defaultOptions.headers, ...headers }; this.blockIdentifier = blockIdentifier || defaultOptions.blockIdentifier; - this.chainId = chainId; - this.getChainId(); // internally skipped if chainId has value + this.chainId = chainId; // setting to a non-null value skips making a request in getChainId() } public fetch(method: string, params?: object, id: string | number = 0) {