Skip to content

Commit

Permalink
fix: get available balance
Browse files Browse the repository at this point in the history
  • Loading branch information
pLabarta committed Jul 17, 2023
1 parent 0408a79 commit 8751b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cc-cli/src/utils/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function calculateBalanceAfterTx(
): Promise<BN> {
const balance = await getBalance(callerAddress, api);
const fee = await getTxFee(tx, callerAddress);
const availableBalance = balance.free.sub(balance.miscFrozen);
const availableBalance = balance.transferable;
const balanceAfterSending = availableBalance.sub(amount).sub(fee);
return balanceAfterSending;
}
Expand Down

0 comments on commit 8751b9e

Please sign in to comment.