From 80fa1b02bc5ddb0dd0ada53d41e79c580c232ccd Mon Sep 17 00:00:00 2001 From: Matias Date: Thu, 16 Jan 2025 08:57:02 -0300 Subject: [PATCH] fix: cleanup TAPCollectorAuthorizationAlreadyRevoked --- packages/horizon/contracts/interfaces/ITAPCollector.sol | 4 ++-- .../horizon/contracts/payments/collectors/TAPCollector.sol | 2 +- .../test/payments/tap-collector/signer/thawSigner.t.sol | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/horizon/contracts/interfaces/ITAPCollector.sol b/packages/horizon/contracts/interfaces/ITAPCollector.sol index 194edb11a..4906e3a1f 100644 --- a/packages/horizon/contracts/interfaces/ITAPCollector.sol +++ b/packages/horizon/contracts/interfaces/ITAPCollector.sol @@ -125,10 +125,10 @@ interface ITAPCollector is IPaymentsCollector { error TAPCollectorSignerNotAuthorizedByPayer(address payer, address signer); /** - * Thrown when the attempting to revoke a signer that was already revoked + * Thrown when attempting to thaw a signer that is already revoked * @param signer The address of the signer */ - error TAPCollectorAuthorizationAlreadyRevoked(address payer, address signer); + error TAPCollectorAuthorizationAlreadyRevoked(address signer); /** * Thrown when attempting to thaw a signer that is already thawing diff --git a/packages/horizon/contracts/payments/collectors/TAPCollector.sol b/packages/horizon/contracts/payments/collectors/TAPCollector.sol index 5b9faa932..c63af8cff 100644 --- a/packages/horizon/contracts/payments/collectors/TAPCollector.sol +++ b/packages/horizon/contracts/payments/collectors/TAPCollector.sol @@ -81,7 +81,7 @@ contract TAPCollector is EIP712, GraphDirectory, ITAPCollector { PayerAuthorization storage authorization = authorizedSigners[signer]; require(authorization.payer == msg.sender, TAPCollectorSignerNotAuthorizedByPayer(msg.sender, signer)); - require(!authorization.revoked, TAPCollectorAuthorizationAlreadyRevoked(msg.sender, signer)); + require(!authorization.revoked, TAPCollectorAuthorizationAlreadyRevoked(signer)); require( authorization.thawEndTimestamp == 0, TAPCollectorSignerAlreadyThawing(signer, authorization.thawEndTimestamp) diff --git a/packages/horizon/test/payments/tap-collector/signer/thawSigner.t.sol b/packages/horizon/test/payments/tap-collector/signer/thawSigner.t.sol index def79d831..eb0c4cf07 100644 --- a/packages/horizon/test/payments/tap-collector/signer/thawSigner.t.sol +++ b/packages/horizon/test/payments/tap-collector/signer/thawSigner.t.sol @@ -34,7 +34,6 @@ contract TAPCollectorThawSignerTest is TAPCollectorTest { bytes memory expectedError = abi.encodeWithSelector( ITAPCollector.TAPCollectorAuthorizationAlreadyRevoked.selector, - users.gateway, signer ); vm.expectRevert(expectedError);