Skip to content

Commit

Permalink
Merge pull request #98 from sotatek-dev/fix/history-user
Browse files Browse the repository at this point in the history
fix: if logic
  • Loading branch information
Sotatek-TanHoang authored Sep 26, 2024
2 parents 88794b3 + 72f5f95 commit 274e187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/crawler/batch.tokenprice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
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;
}
Expand Down

0 comments on commit 274e187

Please sign in to comment.