Skip to content

Commit

Permalink
Merge pull request #2957 from Emurgo/ruslan/fix-zero-token-amount
Browse files Browse the repository at this point in the history
Not allowing tx-building when token amount is zero
  • Loading branch information
vsubhuman committed Aug 10, 2022
2 parents e8fe31e + 7abef47 commit ba52901
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -270,10 +270,10 @@ export default class TransactionBuilderStore extends Store<StoresMap, ActionsMap
if (this.plannedTxInfoMap.length === 0) return false;
for (const token of this.plannedTxInfoMap) {
// we only care about the value in non-sendall case
if (
!token.shouldSendAll && !token.amount
) {
return false;
if (!token.shouldSendAll) {
if (token.amount == null || new BigNumber(token.amount).isLessThanOrEqualTo(0)) {
return false;
}
}
if (this.receiver == null) {
return false;
Expand Down

0 comments on commit ba52901

Please sign in to comment.