diff --git a/neo/Wallets/Wallet.cs b/neo/Wallets/Wallet.cs index 96c9648b81..50d74ca340 100644 --- a/neo/Wallets/Wallet.cs +++ b/neo/Wallets/Wallet.cs @@ -316,7 +316,9 @@ public Transaction MakeTransaction(List attributes, IEnume } ApplicationEngine engine = ApplicationEngine.Run(script); if (engine.State.HasFlag(VMState.FAULT)) return null; - balances.Add((account, engine.ResultStack.Pop().GetBigInteger())); + var result = engine.ResultStack.Pop().GetBigInteger(); + if (result == 0) continue; + balances.Add((account, result)); } BigInteger sum = balances.Aggregate(BigInteger.Zero, (x, y) => x + y.Value); if (sum < output.Value) return null;