@@ -74,11 +74,8 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
7474 emit IAuthorizable.SignerAuthorized (msgSender, _signer);
7575
7676 graphTallyCollector.authorizeSigner (_signer, _proofDeadline, _proof);
77-
78- IAuthorizable.Authorization memory auth = graphTallyCollector.getAuthorization (_signer);
79- assertEq (auth.authorizer, msgSender);
80- assertEq (auth.thawEndTimestamp, 0 );
81- assertEq (auth.revoked, false );
77+ assertTrue (graphTallyCollector.isAuthorized (msgSender, _signer));
78+ assertEq (graphTallyCollector.getThawEnd (_signer), 0 );
8279 }
8380
8481 function _thawSigner (address _signer ) internal {
@@ -90,10 +87,8 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
9087
9188 graphTallyCollector.thawSigner (_signer);
9289
93- IAuthorizable.Authorization memory auth = graphTallyCollector.getAuthorization (_signer);
94- assertEq (auth.authorizer, msgSender);
95- assertEq (auth.thawEndTimestamp, expectedThawEndTimestamp);
96- assertEq (auth.revoked, false );
90+ assertTrue (graphTallyCollector.isAuthorized (msgSender, _signer));
91+ assertEq (graphTallyCollector.getThawEnd (_signer), expectedThawEndTimestamp);
9792 }
9893
9994 function _cancelThawSigner (address _signer ) internal {
@@ -104,27 +99,22 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
10499
105100 graphTallyCollector.cancelThawSigner (_signer);
106101
107- IAuthorizable.Authorization memory auth = graphTallyCollector.getAuthorization (_signer);
108- assertEq (auth.authorizer, msgSender);
109- assertEq (auth.thawEndTimestamp, 0 );
110- assertEq (auth.revoked, false );
102+ assertTrue (graphTallyCollector.isAuthorized (msgSender, _signer));
103+ assertEq (graphTallyCollector.getThawEnd (_signer), 0 );
111104 }
112105
113106 function _revokeAuthorizedSigner (address _signer ) internal {
114107 (, address msgSender , ) = vm.readCallers ();
115108
116- IAuthorizable.Authorization memory beforeAuth = graphTallyCollector.getAuthorization (_signer);
109+ assertTrue (graphTallyCollector.isAuthorized (msgSender, _signer));
110+ assertLt (graphTallyCollector.getThawEnd (_signer), block .timestamp );
117111
118112 vm.expectEmit (address (graphTallyCollector));
119113 emit IAuthorizable.SignerRevoked (msgSender, _signer);
120114
121115 graphTallyCollector.revokeAuthorizedSigner (_signer);
122116
123- IAuthorizable.Authorization memory afterAuth = graphTallyCollector.getAuthorization (_signer);
124-
125- assertEq (beforeAuth.authorizer, afterAuth.authorizer);
126- assertEq (beforeAuth.thawEndTimestamp, afterAuth.thawEndTimestamp);
127- assertEq (afterAuth.revoked, true );
117+ assertFalse (graphTallyCollector.isAuthorized (msgSender, _signer));
128118 }
129119
130120 function _collect (IGraphPayments.PaymentTypes _paymentType , bytes memory _data ) internal {
@@ -144,14 +134,11 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
144134 _data,
145135 (IGraphTallyCollector.SignedRAV, uint256 )
146136 );
147- bytes32 messageHash = graphTallyCollector.encodeRAV (signedRAV.rav);
148- address _signer = ECDSA.recover (messageHash, signedRAV.signature);
149- IAuthorizable.Authorization memory auth = graphTallyCollector.getAuthorization (_signer);
150137 uint256 tokensAlreadyCollected = graphTallyCollector.tokensCollected (
151138 signedRAV.rav.dataService,
152139 signedRAV.rav.collectionId,
153140 signedRAV.rav.serviceProvider,
154- auth.authorizer
141+ signedRAV.rav.payer
155142 );
156143 uint256 tokensToCollect = _tokensToCollect == 0
157144 ? signedRAV.rav.valueAggregate - tokensAlreadyCollected
@@ -161,15 +148,15 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
161148 emit IPaymentsCollector.PaymentCollected (
162149 _paymentType,
163150 signedRAV.rav.collectionId,
164- auth.authorizer ,
151+ signedRAV.rav.payer ,
165152 signedRAV.rav.serviceProvider,
166153 signedRAV.rav.dataService,
167154 tokensToCollect
168155 );
169156 vm.expectEmit (address (graphTallyCollector));
170157 emit IGraphTallyCollector.RAVCollected (
171158 signedRAV.rav.collectionId,
172- auth.authorizer ,
159+ signedRAV.rav.payer ,
173160 signedRAV.rav.serviceProvider,
174161 signedRAV.rav.dataService,
175162 signedRAV.rav.timestampNs,
@@ -185,7 +172,7 @@ contract GraphTallyTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest {
185172 signedRAV.rav.dataService,
186173 signedRAV.rav.collectionId,
187174 signedRAV.rav.serviceProvider,
188- auth.authorizer
175+ signedRAV.rav.payer
189176 );
190177 assertEq (tokensCollected, tokensToCollect);
191178 assertEq (
0 commit comments