Skip to content

Commit

Permalink
Fix notifications (neo-project#1422)
Browse files Browse the repository at this point in the history
Co-authored-by: Vitor Nazário Coelho <[email protected]>
  • Loading branch information
2 people authored and Tommo-L committed Jun 22, 2020
1 parent abffe5c commit 6b60462
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 6b60462

Please sign in to comment.