You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(contracts): until parameter is not correctly set on UserPayment event #2268
When emitting emit UserPayment(msg.sender, amount, block.timestamp, block.timestamp + paymentExpirationTimeSeconds);, it should emit until = newExpiration
/**
* @notice Accepts payments and validates they meet the minimum requirement.
*/
receive() external payable {
uint256 amount = msg.value;
if (amount < amountToPayInWei) {
revert InvalidDepositAmount(amount, amountToPayInWei);
}
if (activeSubscriptionsAmount >= subscriptionLimit) {
revert SubscriptionLimitReached(subscriptionLimit);
}
if (subscribedAddresses[msg.sender] < block.timestamp) {
// Subscription is inactive/expired: start a new period from now.
subscribedAddresses[msg.sender] = block.timestamp + paymentExpirationTimeSeconds;
++activeSubscriptionsAmount;
} else {
// Subscription is still active: extend the current expiry by one period.
subscribedAddresses[msg.sender] = subscribedAddresses[msg.sender] + paymentExpirationTimeSeconds;
}
uint256 newExpiration = subscribedAddresses[msg.sender];
if (newExpiration - block.timestamp > maxSubscriptionTimeAhead) {
revert SubscriptionTimeExceedsLimit(newExpiration, maxSubscriptionTimeAhead);
}
emit UserPayment(msg.sender, amount, block.timestamp, block.timestamp + paymentExpirationTimeSeconds);
}
changed the title [-]fix(contracts): until parameter is not correctly set on UserPayment event[/-][+]fix(contracts): `until` parameter is not correctly set on `UserPayment` event[/+]on Jan 21, 2026
Activity
[-]fix(contracts): until parameter is not correctly set on UserPayment event[/-][+]fix(contracts): `until` parameter is not correctly set on `UserPayment` event[/+]