Skip to content

Commit fc620c4

Browse files
Improve the if branches comments on receive method
1 parent 9595158 commit fc620c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/src/core/AggregationModePaymentService.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ contract AggregationModePaymentService is Initializable, UUPSUpgradeable, Access
223223
}
224224

225225
if (subscribedAddresses[msg.sender] < block.timestamp) {
226-
// If user has not an active subscription, the next expiration date is the current time plus the expiration window
226+
// Subscription is inactive/expired: start a new period from now.
227227
subscribedAddresses[msg.sender] = block.timestamp + paymentExpirationTimeSeconds;
228228
} else {
229-
// If user has already an active subscription, the next expiration date is the user expiration deadline plus the expiration window
229+
// Subscription is still active: extend the current expiry by one period.
230230
subscribedAddresses[msg.sender] = subscribedAddresses[msg.sender] + paymentExpirationTimeSeconds;
231231
}
232232

0 commit comments

Comments
 (0)