Skip to content

Commit

Permalink
fix: cleanup TAPCollectorAuthorizationAlreadyRevoked
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasedgeandnode committed Jan 16, 2025
1 parent ca2ef4f commit 80fa1b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/horizon/contracts/interfaces/ITAPCollector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ contract TAPCollectorThawSignerTest is TAPCollectorTest {

bytes memory expectedError = abi.encodeWithSelector(
ITAPCollector.TAPCollectorAuthorizationAlreadyRevoked.selector,
users.gateway,
signer
);
vm.expectRevert(expectedError);
Expand Down

0 comments on commit 80fa1b0

Please sign in to comment.