Skip to content

Commit fbce580

Browse files
fix: [TRST-R-4] CEI violation
1 parent d29d78e commit fbce580

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/horizon/contracts/payments/collectors/RecurringCollector.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
343343
slippage <= _params.maxSlippage,
344344
RecurringCollectorExcessiveSlippage(_params.tokens, tokensToCollect, _params.maxSlippage)
345345
);
346+
}
347+
agreement.lastCollectionAt = uint64(block.timestamp);
346348

349+
if (tokensToCollect > 0) {
347350
_graphPaymentsEscrow().collect(
348351
_paymentType,
349352
agreement.payer,
@@ -354,7 +357,6 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
354357
_params.receiverDestination
355358
);
356359
}
357-
agreement.lastCollectionAt = uint64(block.timestamp);
358360

359361
emit PaymentCollected(
360362
_paymentType,

0 commit comments

Comments
 (0)