Skip to content

Commit

Permalink
Code423n4 #119, disallow collecting future rent
Browse files Browse the repository at this point in the history
  • Loading branch information
Splidge committed Jun 21, 2021
1 parent b1920da commit eb344de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/RCTreasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ contract RCTreasury is Ownable, NativeMetaTransaction, IRCTreasury {
{
require(!globalPause, "Global pause is enabled");
require(_timeToCollectTo != 0, "Must set collection time");
require(
_timeToCollectTo <= block.timestamp,
"Can't collect future rent"
);
if (user[_user].lastRentCalc < _timeToCollectTo) {
uint256 rentOwedByUser = rentOwedUser(_user, _timeToCollectTo);

Expand Down

0 comments on commit eb344de

Please sign in to comment.