diff --git a/contracts/NftRentalMarketplace.sol b/contracts/NftRentalMarketplace.sol index 47585c4..464cfea 100644 --- a/contracts/NftRentalMarketplace.sol +++ b/contracts/NftRentalMarketplace.sol @@ -192,7 +192,6 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr * @notice Cancels a rental offer. * @param _offer The rental offer struct. It should be the same as the one used to create the offer. */ - function cancelRentalOffer(RentalOffer calldata _offer) external whenNotPaused { _cancelRentalOffer(_offer); } @@ -202,7 +201,6 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr * @dev Can only be called by the lender, and only withdraws the NFT if the rental has expired. * @param _offer The rental offer struct. It should be the same as the one used to create the offer. */ - function cancelRentalOfferAndWithdraw(RentalOffer calldata _offer) external whenNotPaused { _cancelRentalOffer(_offer); @@ -258,6 +256,9 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr ); nonceDeadline[msg.sender][_offer.nonce] = uint64(block.timestamp); + for(uint256 i = 0; i < _offer.roles.length; i++) { + roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] = uint64(block.timestamp); + } emit RentalOfferCancelled(_offer.lender, _offer.nonce); } diff --git a/contracts/libraries/LibNftRentalMarketplace.sol b/contracts/libraries/LibNftRentalMarketplace.sol index 0117f79..9693189 100644 --- a/contracts/libraries/LibNftRentalMarketplace.sol +++ b/contracts/libraries/LibNftRentalMarketplace.sol @@ -226,7 +226,7 @@ library LibNftRentalMarketplace { /** * @notice Validates the cancel rental offer params. * @dev This function is used to validate the cancel rental offer params. - * @param _isCreated The offer is created + * @param _isCreated Whether the offer is created * @param _lender The lender address * @param _nonceDeadline The nonce deadline */