Skip to content

Commit 703bbfc

Browse files
PR reviews
1 parent 87db4e9 commit 703bbfc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libs/coin-modules/coin-polkadot/src/bridge/getTransactionStatus.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ const getSendTransactionStatus: AccountBridge<
7474
}
7575

7676
if (!(errors.amount instanceof AmountRequired)) {
77-
if (!transaction.useAllAmount && account.spendableBalance.isZero()) {
78-
errors.amount = new NotEnoughBalance();
79-
} else if (totalSpent.gt(account.spendableBalance)) {
77+
if (
78+
(!transaction.useAllAmount && account.spendableBalance.isZero()) ||
79+
totalSpent.gt(account.spendableBalance)
80+
) {
8081
errors.amount = new NotEnoughBalance();
8182
}
8283

0 commit comments

Comments
 (0)