Skip to content

Commit

Permalink
Update balance.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdotb committed May 15, 2024
1 parent 4044e85 commit 3bde013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export async function fetchAccountBalances(address: string): Promise<AccountBala
const available_balance = await node_api.getAvailableBalance(address);

// Filter the balances to find the one with denom 'ncheq'
const ncheqBalance = available_balance.find(balance => balance.denom === 'ncheq');
const ncheqBalance = available_balance.find((balance) => balance.denom === 'ncheq');

let available_balance_in_ncheq = 0;
if (available_balance.length > 0) {
available_balance_in_ncheq = ncheqBalance ? Number(ncheqBalance.amount) : 0;;
available_balance_in_ncheq = ncheqBalance ? Number(ncheqBalance.amount) : 0;
}

const reward_balance_in_ncheq = await node_api.distributionGetRewards(address);
Expand Down

0 comments on commit 3bde013

Please sign in to comment.