forked from TrueCloudLab/neoneo-go
Task/fix sc template (#100)
* Fixed security issue in smart contract template * Bumped version * fixed typo
This commit is contained in:
parent
d77354db66
commit
903bb86f96
2 changed files with 4 additions and 1 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.44.8
|
||||
0.44.9
|
||||
|
|
|
@ -228,6 +228,9 @@ func approve(ctx storage.Context, owner, spender []byte, amount int) bool {
|
|||
if !runtime.CheckWitness(owner) || amount < 0 {
|
||||
return false
|
||||
}
|
||||
if len(spender) != 20 {
|
||||
return false
|
||||
}
|
||||
toSpend := storage.Get(ctx, owner).(int)
|
||||
if toSpend < amount {
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue