Skip to content

Commit

Permalink
Merge pull request #59 from dappforce/fex-free-balance
Browse files Browse the repository at this point in the history
Check that balance is more than 0
  • Loading branch information
olehmell authored Nov 14, 2023
2 parents 719f4ed + b48b760 commit 3ce83a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/balances/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const getNativeTokenBalance = async (api: ApiPromise, account: string) => {
totalBalance: totalBalance?.toString(),
reservedBalance: reserved?.toString(),
frozenBalance: frozen?.toString(),
freeBalance: freeBalance?.toString(),
freeBalance: freeBalance?.gt(new BN(0)) ? freeBalance?.toString() : '0',
lockedBalance: lockedBalance?.toString(),
locks: locks.map(({ id, amount, reasons }) => ({ id: id.toHuman(), amount: amount.toString(), reasons}))
}
Expand Down

0 comments on commit 3ce83a0

Please sign in to comment.