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 5dc635d commit 9cad6f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr
_offer.tokenId,
_offer.roles
);

for (uint256 i = 0; i < _offer.roles.length; i++) {
if( roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] > uint64(block.timestamp) ) {
if( _offer.deadline > 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 9cad6f3

Please sign in to comment.