native: fix Transfer event in burn

Tokens should subtract, but transfer amount is positive.
This commit is contained in:
Evgenii Stratonikov 2020-06-18 16:19:07 +03:00
parent 295d8fc70e
commit 3e76b9a9bf

View file

@ -224,8 +224,7 @@ func (c *nep5TokenNative) burn(ic *interop.Context, h util.Uint160, amount *big.
if amount.Sign() == 0 {
return
}
amount = new(big.Int).Neg(amount)
c.addTokens(ic, h, amount)
c.addTokens(ic, h, new(big.Int).Neg(amount))
c.emitTransfer(ic, &h, nil, amount)
}