Skip to content

Commit

Permalink
Merge pull request #3784 from BitGo/WIN-180-sdk-add-recover-functiona…
Browse files Browse the repository at this point in the history
…lity-for-pending-cosmos-side-chains

fix(abstract-cosmos): getAccountBalance fix
  • Loading branch information
DinshawKothari authored Aug 4, 2023
2 parents 6fe9c60 + 94b7dbc commit e0dd9b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/abstract-cosmos/src/cosmosCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ export class CosmosCoin extends BaseCoin {
if (response.status !== 200) {
throw new Error('Account not found');
}
return response.body.balances[0].amount;
const balance = response.body.balances.find((item) => item.denom === this.getDenomination());
return balance.amount;
}

/**
Expand Down

0 comments on commit e0dd9b7

Please sign in to comment.