From 617858b86559efff17502b9e697c0fc6ac77ff50 Mon Sep 17 00:00:00 2001 From: Erik Martinez Date: Wed, 18 Jan 2023 23:02:11 +0100 Subject: [PATCH] Init this.provider after reading .env file --- lib/DataProvider.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/DataProvider.ts b/lib/DataProvider.ts index 34e09c44..30de040d 100644 --- a/lib/DataProvider.ts +++ b/lib/DataProvider.ts @@ -111,9 +111,6 @@ class DataProvider { return dpd; }) - this.provider = getProvider(conf.rpcUrl); - - if (this.data.length == 0) { throw Error("No price providers in configuration!"); } @@ -425,6 +422,7 @@ class DataProvider { this.logger.info(` * rpcUrl from conf '${conf.rpcUrl}'`) } + this.provider = getProvider(conf.rpcUrl); this.web3 = getWeb3(conf.rpcUrl); this.waitFinalize3 = waitFinalize3Factory(this.web3); this.account = getWeb3Wallet(this.web3, accountPrivateKey);