From de231dbfe1dadc609ce047cf487fd47a4dff96b1 Mon Sep 17 00:00:00 2001 From: Yevhen Shulha Date: Sat, 30 Sep 2023 23:26:57 +0300 Subject: [PATCH] fix: await init --- src/dex/algebra/algebra.ts | 2 +- src/dex/pancakeswap-v3/pancakeswap-v3.ts | 2 +- src/dex/uniswap-v3/uniswap-v3.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dex/algebra/algebra.ts b/src/dex/algebra/algebra.ts index bc18ddd4d..32efc8326 100644 --- a/src/dex/algebra/algebra.ts +++ b/src/dex/algebra/algebra.ts @@ -137,7 +137,7 @@ export class Algebra extends SimpleExchange implements IDex { async initializePricing(blockNumber: number) { // Init listening to new pools creation - this.factory.initialize(blockNumber); + await this.factory.initialize(blockNumber); if (!this.dexHelper.config.isSlave) { const cleanExpiredNotExistingPoolsKeys = async () => { diff --git a/src/dex/pancakeswap-v3/pancakeswap-v3.ts b/src/dex/pancakeswap-v3/pancakeswap-v3.ts index d72f46dde..5ec7d2183 100644 --- a/src/dex/pancakeswap-v3/pancakeswap-v3.ts +++ b/src/dex/pancakeswap-v3/pancakeswap-v3.ts @@ -147,7 +147,7 @@ export class PancakeswapV3 async initializePricing(blockNumber: number) { // Init listening to new pools creation - this.factory.initialize(blockNumber); + await this.factory.initialize(blockNumber); if (!this.dexHelper.config.isSlave) { const cleanExpiredNotExistingPoolsKeys = async () => { diff --git a/src/dex/uniswap-v3/uniswap-v3.ts b/src/dex/uniswap-v3/uniswap-v3.ts index 51fc9d4b8..1f2a6b613 100644 --- a/src/dex/uniswap-v3/uniswap-v3.ts +++ b/src/dex/uniswap-v3/uniswap-v3.ts @@ -165,7 +165,7 @@ export class UniswapV3 async initializePricing(blockNumber: number) { // Init listening to new pools creation - this.factory.initialize(blockNumber); + await this.factory.initialize(blockNumber); // This is only for testing, because cold pool fetching is goes out of // FETCH_POOL_INDENTIFIER_TIMEOUT range