Skip to content

Commit

Permalink
ON-814: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Apr 24, 2024
1 parent 959e877 commit 5a48c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);

Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/LibNftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 5a48c16

Please sign in to comment.