diff --git a/examples/token/nep5/nep5.go b/examples/token/nep5/nep5.go index 96a465b6d..742e0e3df 100644 --- a/examples/token/nep5/nep5.go +++ b/examples/token/nep5/nep5.go @@ -58,7 +58,7 @@ func (t Token) Transfer(ctx storage.Context, from []byte, to []byte, amount int) // CanTransfer returns the amount it can transfer func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount int) int { - if len(to) != 20 && !IsUsableAddress(from) { + if len(to) != 20 || !IsUsableAddress(from) { return -1 }