From fb1291b2a1a38911c3ae2e907bdd91ac66313c81 Mon Sep 17 00:00:00 2001 From: Spablob Date: Sun, 14 Apr 2024 17:47:07 +0300 Subject: [PATCH] lift restriction on payerIpId --- contracts/modules/royalty/RoyaltyModule.sol | 4 +--- .../integration/flows/licensing/LicensingIntegration.t.sol | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/contracts/modules/royalty/RoyaltyModule.sol b/contracts/modules/royalty/RoyaltyModule.sol index c4159c840..f3573162f 100644 --- a/contracts/modules/royalty/RoyaltyModule.sol +++ b/contracts/modules/royalty/RoyaltyModule.sol @@ -206,9 +206,7 @@ contract RoyaltyModule is if (!$.isWhitelistedRoyaltyPolicy[payerRoyaltyPolicy]) revert Errors.RoyaltyModule__NotWhitelistedRoyaltyPolicy(); - ILicenseRegistry licenseRegistry = LICENSE_REGISTRY; - if (licenseRegistry.isExpiredNow(receiverIpId) || licenseRegistry.isExpiredNow(payerIpId)) - revert Errors.RoyaltyModule__IpIsExpired(); + if (LICENSE_REGISTRY.isExpiredNow(receiverIpId)) revert Errors.RoyaltyModule__IpIsExpired(); IRoyaltyPolicy(payerRoyaltyPolicy).onRoyaltyPayment(msg.sender, receiverIpId, token, amount); diff --git a/test/foundry/integration/flows/licensing/LicensingIntegration.t.sol b/test/foundry/integration/flows/licensing/LicensingIntegration.t.sol index 902e0da58..076140ec4 100644 --- a/test/foundry/integration/flows/licensing/LicensingIntegration.t.sol +++ b/test/foundry/integration/flows/licensing/LicensingIntegration.t.sol @@ -127,7 +127,6 @@ contract e2e is Test { ) ); - impl = address(new RoyaltyModule(address(disputeModule), address(licenseRegistry))); royaltyModule = RoyaltyModule( TestProxyHelper.deployUUPSProxy( @@ -136,7 +135,7 @@ contract e2e is Test { ) ); vm.label(address(royaltyModule), "RoyaltyModule"); - + impl = address( new LicensingModule( address(accessController),