Skip to content

Commit

Permalink
hotfix: read amount undefined in account fungible token page (#3689) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TranTrungTien authored Sep 9, 2024
1 parent c7e2d07 commit 2180e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/core/data-services/api-account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class ApiAccountService {
}

const value = spendableBalances?.find((f) => f.denom === this.currencies.coinMinimalDenom);
const amount = value.amount || 0;
const amount = value?.amount || 0;
return balanceOf(amount, this.currencies.coinDecimals);
}

Expand Down
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 @@ -259,7 +259,7 @@ export class ApiCw20TokenService {
image: coinMarket?.image,
max_total_supply: 0,
contract_address: '-',
balance: balanceOf(item.amount, this.currencies.coinDecimals),
balance: balanceOf(item?.amount, this.currencies.coinDecimals),
price: coinMarket?.currentPrice || 0,
priceChangePercentage24h: coinMarket?.priceChangePercentage24h || 0,
value: value.toFixed(),
Expand Down

0 comments on commit 2180e07

Please sign in to comment.