Skip to content

Commit

Permalink
update: default balance value to prevent NaN (#3626)
Browse files Browse the repository at this point in the history
  • Loading branch information
TranTrungTien committed Jul 12, 2024
1 parent d1f083c commit 2452a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/data-services/api-cw20-token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class ApiCw20TokenService {

parseUSDCToken(token, coinsMarkets) {
const USDCMarket = coinsMarkets?.find((item) => item.coinId === USDC_COIN_ID);
const amount = getBalance(token?.balance, token?.decimals);
const amount = getBalance(token?.balance || 0, token?.decimals);
const value = new BigNumber(amount).multipliedBy(Number(USDCMarket?.currentPrice || 0));

return {
Expand Down

0 comments on commit 2452a27

Please sign in to comment.