From 72f5f956267cccb52f266e76f5e625cf245c12ad Mon Sep 17 00:00:00 2001 From: Tan Hoang Date: Thu, 26 Sep 2024 15:31:46 +0700 Subject: [PATCH] fix: if logic --- src/modules/crawler/batch.tokenprice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/crawler/batch.tokenprice.ts b/src/modules/crawler/batch.tokenprice.ts index 68b207c..b60efa1 100644 --- a/src/modules/crawler/batch.tokenprice.ts +++ b/src/modules/crawler/batch.tokenprice.ts @@ -39,7 +39,7 @@ export class BatchJobGetPriceToken { this.logger.info(`Total tokens updated = ${res.filter(e => !!e).length}`); } private async updateTokenPrice(symbol: EAsset, newPrice: string): Promise { - if (isEmpty(newPrice) && !isNumberString(newPrice.toString())) { + if (isEmpty(newPrice) || !isNumberString(newPrice.toString())) { this.logger.warn(`Cannot get ${symbol} token price from CoinMarketCap! value ${newPrice}.`); return false; }