Skip to content

Commit

Permalink
Fix notifications (#1422)
Browse files Browse the repository at this point in the history
Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
  • Loading branch information
shargon and vncoelho committed Jan 18, 2020
1 parent d5ec715 commit 35c73ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/neo/SmartContract/Native/Tokens/Nep5Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ internal protected virtual void Mint(ApplicationEngine engine, UInt160 account,
BigInteger totalSupply = new BigInteger(storage.Value);
totalSupply += amount;
storage.Value = totalSupply.ToByteArrayStandard();
engine.SendNotification(Hash, new Array(engine.ReferenceCounter, new StackItem[] { "Transfer", StackItem.Null, account.ToArray(), amount }));
engine.SendNotification(Hash, new Array(new StackItem[] { "Transfer", StackItem.Null, account.ToArray(), amount }));
}

internal protected virtual void Burn(ApplicationEngine engine, UInt160 account, BigInteger amount)
Expand All @@ -112,7 +112,7 @@ internal protected virtual void Burn(ApplicationEngine engine, UInt160 account,
BigInteger totalSupply = new BigInteger(storage.Value);
totalSupply -= amount;
storage.Value = totalSupply.ToByteArrayStandard();
engine.SendNotification(Hash, new Array(engine.ReferenceCounter, new StackItem[] { "Transfer", account.ToArray(), StackItem.Null, amount }));
engine.SendNotification(Hash, new Array(new StackItem[] { "Transfer", account.ToArray(), StackItem.Null, amount }));
}

[ContractMethod(0, ContractParameterType.String, Name = "name", SafeMethod = true)]
Expand Down Expand Up @@ -222,7 +222,7 @@ protected virtual bool Transfer(ApplicationEngine engine, UInt160 from, UInt160
storage_to.Value = state_to.ToByteArray();
}
}
engine.SendNotification(Hash, new Array(engine.ReferenceCounter, new StackItem[] { "Transfer", from.ToArray(), to.ToArray(), amount }));
engine.SendNotification(Hash, new Array(new StackItem[] { "Transfer", from.ToArray(), to.ToArray(), amount }));
return true;
}

Expand Down

0 comments on commit 35c73ce

Please sign in to comment.