Skip to content

fix(contracts): emit correct newExpiration in UserPayment.until - #2304

Open
erhnysr wants to merge 1 commit into
yetanotherco:stagingfrom
erhnysr:fix/2268-userpayment-until-event
Open

fix(contracts): emit correct newExpiration in UserPayment.until#2304
erhnysr wants to merge 1 commit into
yetanotherco:stagingfrom
erhnysr:fix/2268-userpayment-until-event

Conversation

@erhnysr

@erhnysr erhnysr commented Sep 1, 2026

Copy link
Copy Markdown

Closes #2268. Added a Foundry test proving the extension case (test_UserPayment_emitsCorrectUntil_onExtendedSubscription) failed before this fix and passes after — the emitted until now matches what's actually stored in subscribedAddresses.

…notherco#2268)

receive() computed newExpiration to validate against
maxSubscriptionTimeAhead, but the UserPayment event re-derived
block.timestamp + paymentExpirationTimeSeconds instead of using it --
wrong (earlier) 'until' whenever an active subscription is extended,
diverging from what's actually stored in subscribedAddresses.

Fixes yetanotherco#2268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant