Skip to content

Commit

Permalink
Task/fix sc template (#100)
Browse files Browse the repository at this point in the history
* Fixed security issue in smart contract template

* Bumped version

* fixed typo
  • Loading branch information
Anthony De Meulemeester committed Sep 27, 2018
1 parent d77354d commit 903bb86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.44.8
0.44.9
3 changes: 3 additions & 0 deletions examples/token-sale/token_sale.go
Expand Up @@ -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
Expand Down

0 comments on commit 903bb86

Please sign in to comment.