forked from TrueCloudLab/neoneo-go
core: fix bug in nep5TokenNative.addTokens method
Sometimes we want to add negative amount (e.g. when burning tokens).
This commit is contained in:
parent
c7a040ff81
commit
6b2f4efdd4
1 changed files with 1 additions and 3 deletions
|
@ -205,9 +205,7 @@ func (c *nep5TokenNative) burn(ic *interop.Context, h util.Uint160, amount *big.
|
|||
}
|
||||
|
||||
func (c *nep5TokenNative) addTokens(ic *interop.Context, h util.Uint160, amount *big.Int) {
|
||||
if sign := amount.Sign(); sign == -1 {
|
||||
panic("negative amount")
|
||||
} else if sign == 0 {
|
||||
if amount.Sign() == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue