From 126268800c9b6cb7c4634436b3c78c2d129e16c6 Mon Sep 17 00:00:00 2001 From: Daniel Lima Date: Tue, 9 Apr 2024 13:07:43 -0300 Subject: [PATCH] ON-787: fix diff --- contracts/OriumSftMarketplace.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/OriumSftMarketplace.sol b/contracts/OriumSftMarketplace.sol index e2d97f8..7cf63ee 100644 --- a/contracts/OriumSftMarketplace.sol +++ b/contracts/OriumSftMarketplace.sol @@ -159,7 +159,7 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra * @param _offer The rental offer struct. It should be the same as the one used to create the offer. * @param _duration The duration of the rental. */ - function acceptRentalOffer(RentalOffer memory _offer, uint64 _duration) external whenNotPaused { + function acceptRentalOffer(RentalOffer calldata _offer, uint64 _duration) external whenNotPaused { bytes32 _offerHash = LibOriumSftMarketplace.hashRentalOffer(_offer); require(isCreated[_offerHash], "OriumSftMarketplace: Offer not created"); require( @@ -203,7 +203,7 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra * @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 memory _offer) external whenNotPaused { + function cancelRentalOffer(RentalOffer calldata _offer) external whenNotPaused { bytes32 _offerHash = LibOriumSftMarketplace.hashRentalOffer(_offer); require(isCreated[_offerHash], "OriumSftMarketplace: Offer not created"); require(msg.sender == _offer.lender, "OriumSftMarketplace: Only lender can cancel a rental offer"); @@ -233,7 +233,7 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra * @param _offer The rental offer struct. It should be the same as the one used to create the offer. */ - function endRental(RentalOffer memory _offer) external whenNotPaused { + function endRental(RentalOffer calldata _offer) external whenNotPaused { bytes32 _offerHash = LibOriumSftMarketplace.hashRentalOffer(_offer); require(isCreated[_offerHash], "OriumSftMarketplace: Offer not created"); @@ -340,12 +340,12 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra IOriumMarketplaceRoyalties(oriumMarketplaceRoyalties).isTrustedFeeTokenAddressForToken(_offer.tokenAddress, _offer.feeTokenAddress), "OriumSftMarketplace: tokenAddress is not trusted" ); + LibOriumSftMarketplace.validateOffer(_offer); require( _offer.deadline <= block.timestamp + IOriumMarketplaceRoyalties(oriumMarketplaceRoyalties).maxDuration() && _offer.deadline > block.timestamp, "OriumSftMarketplace: Invalid deadline" ); - LibOriumSftMarketplace.validateOffer(_offer); require(nonceDeadline[_offer.lender][_offer.nonce] == 0, "OriumSftMarketplace: nonce already used"); if (_offer.commitmentId != 0) {