Skip to content

Commit

Permalink
withdraw what you can
Browse files Browse the repository at this point in the history
  • Loading branch information
CJentzsch committed May 24, 2016
1 parent 01cc936 commit 22ee2de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SampleOffer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ contract SampleOffer {
if (msg.sender != contractor)
throw;
uint amount = (now - dateOfSignature + 1 days) / (1 days) * dailyWithdrawLimit - paidOut;
if (amount > this.balance) {
amount = this.balance;
}
if (contractor.send(amount))
paidOut += amount;
}
Expand Down

0 comments on commit 22ee2de

Please sign in to comment.