Skip to content

Commit

Permalink
ON-815: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Apr 24, 2024
1 parent 8989646 commit f669f79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 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 Whether the offer is created
* @param _isCreated Whether the offer is created
* @param _lender The lender address
* @param _nonceDeadline The nonce deadline
*/
Expand Down Expand Up @@ -307,9 +307,9 @@ library LibNftRentalMarketplace {
_params[i].tokenAddress
);
require(
msg.sender ==
IERC7432VaultExtension(_rolesRegistry).ownerOf(_params[i].tokenAddress, _params[i].tokenId) ||
msg.sender == IERC721(_params[i].tokenAddress).ownerOf(_params[i].tokenId),
msg.sender == IERC721(_params[i].tokenAddress).ownerOf(_params[i].tokenId) ||
msg.sender ==
IERC7432VaultExtension(_rolesRegistry).ownerOf(_params[i].tokenAddress, _params[i].tokenId),
'OriumNftMarketplace: sender is not the owner'
);

Expand Down Expand Up @@ -350,8 +350,8 @@ library LibNftRentalMarketplace {
'OriumNftMarketplace: role is expired'
);
require(
msg.sender == IERC7432(_rolesRegistry).recipientOf(_tokenAddresses[i], _tokenIds[i], _roleIds[i]) ||
msg.sender == IERC7432VaultExtension(_rolesRegistry).ownerOf(_tokenAddresses[i], _tokenIds[i]),
msg.sender == IERC7432VaultExtension(_rolesRegistry).ownerOf(_tokenAddresses[i], _tokenIds[i]) ||
msg.sender == IERC7432(_rolesRegistry).recipientOf(_tokenAddresses[i], _tokenIds[i], _roleIds[i]),
"OriumNftMarketplace: sender is not the token's owner or recipient"
);
IERC7432(_rolesRegistry).revokeRole(_tokenAddresses[i], _tokenIds[i], _roleIds[i]);
Expand Down

0 comments on commit f669f79

Please sign in to comment.