Skip to content

Commit

Permalink
ON-812: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Apr 19, 2024
1 parent ab03256 commit 877a83a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 2 additions & 4 deletions contracts/NftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr
* @dev To optimize for gas, only the offer hash is stored on-chain
* @param _offer The rental offer struct.
*/
function createRentalOffer(
RentalOffer calldata _offer
) external whenNotPaused {
function createRentalOffer(RentalOffer calldata _offer) external whenNotPaused {
LibNftRentalMarketplace.validateCreateRentalOfferParams(
oriumMarketplaceRoyalties,
_offer,
Expand All @@ -105,7 +103,7 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr
bytes32 _offerHash = LibNftRentalMarketplace.hashRentalOffer(_offer);
isCreated[_offerHash] = true;
nonceDeadline[msg.sender][_offer.nonce] = _offer.deadline;

for (uint256 i = 0; i < _offer.roles.length; i++) {
require(
roleDeadline[_offer.roles[i]][_offer.tokenAddress][_offer.tokenId] < block.timestamp,
Expand Down
10 changes: 6 additions & 4 deletions contracts/libraries/LibNftRentalMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,14 @@ library LibNftRentalMarketplace {
_offer.borrower != address(0) || _offer.feeAmountPerSecond > 0,
'NftRentalMarketplace: feeAmountPerSecond should be greater than 0'
);
require(_offer.minDuration <= _offer.deadline - block.timestamp, 'NftRentalMarketplace: minDuration is invalid');
require(
_offer.minDuration <= _offer.deadline - block.timestamp,
'NftRentalMarketplace: minDuration is invalid'
);
require(_nonceDeadline == 0, 'NftRentalMarketplace: nonce already used');
}

/**
/**
* @dev All values needs to be in wei.
* @param _amount The amount to calculate the percentage from.
* @param _percentage The percentage to calculate.
Expand All @@ -97,7 +100,7 @@ library LibNftRentalMarketplace {
return (_amount * _percentage) / MAX_PERCENTAGE;
}

/**
/**
* @notice Transfers the fees.
* @dev The fee token address should be approved before calling this function.
* @param _feeTokenAddress The fee token address.
Expand Down Expand Up @@ -209,5 +212,4 @@ library LibNftRentalMarketplace {
);
}
}

}

0 comments on commit 877a83a

Please sign in to comment.