Skip to content

Commit

Permalink
fix: updating roleDeadline EndRental
Browse files Browse the repository at this point in the history
  • Loading branch information
EDUARDO MELO DE SIQUEIRA authored and EDUARDO MELO DE SIQUEIRA committed Jun 25, 2024
1 parent 2f4f767 commit 5dc635d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr
_offer.roles
);

for (uint256 i = 0; i < _offer.roles.length; i++) {
if( roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] > uint64(block.timestamp) ) {
roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] = uint64(block.timestamp);
}
}

_rental.expirationDate = uint64(block.timestamp);
emit RentalEnded(_offer.lender, _offer.nonce);
}
Expand Down

0 comments on commit 5dc635d

Please sign in to comment.