Skip to content

Commit 01cc936

Browse files
committed
Merge pull request #169 from LefterisJP/fix_get_daily_payment
Fix `getDailyPayment()` calculation
2 parents dcb15dd + 4d0ae5d commit 01cc936

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

SampleOfferWithoutReward.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ contract SampleOfferWithoutRewards {
9292
if (msg.sender != contractor)
9393
throw;
9494
uint amount = (now - dateOfSignature + 1 days) / (1 days) * dailyWithdrawLimit - paidOut;
95+
if (amount > this.balance) {
96+
amount = this.balance;
97+
}
9598
if (contractor.send(amount))
9699
paidOut += amount;
97100
}

0 commit comments

Comments
 (0)