Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: El De-dog-lo <[email protected]>
  • Loading branch information
charles-cooper and fubuloubu authored Nov 7, 2023
1 parent 29b2c34 commit d6854b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/crowdfund.vy
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def __init__(_beneficiary: address, _goal: uint256, _timelimit: uint256):
@external
@payable
def participate():
assert block.timestamp < self.deadline, "deadline is already overdue"
assert block.timestamp < self.deadline, "deadline has expired"

self.funders[msg.sender] += msg.value

# Enough money was raised! Send funds to the beneficiary
@external
def finalize():
assert block.timestamp >= self.deadline, "deadline is already overdue"
assert block.timestamp >= self.deadline, "deadline has not expired yet"
assert self.balance >= self.goal, "goal has not been reached"

selfdestruct(self.beneficiary)
Expand Down

0 comments on commit d6854b3

Please sign in to comment.