Enrich refund/expiry events and fix funds_unlocked gap - #657
Open
GenesisPray wants to merge 2 commits into
Open
Conversation
- invoice_refunded now carries the total amount returned to all payers instead of an empty payload, so indexers can reconcile refunds without cross-referencing individual payer_refunded events. Updated all four emission sites (arbiter resolve-refund, auto-resolve refund, deadline refund, dispute-refund) to pass the summed total. - invoice_expired now includes the invoice creator's address alongside (deadline, funded), letting indexers attribute expired invoices to creators without a follow-up get_invoice call. - release_to_recipient enforced the InvoiceExt3::release_delay_ledgers time-lock but never emitted funds_unlocked when the lock cleared, unlike release_invoice. Added the missing emission so the event fires consistently across both release paths at the exact unlock ledger. No InvoiceExt2::creator_fee_bps field or mutation path exists in this contract (fees are governed by a global platform_fee_bps plus a boolean per-creator waiver list, which already emits fee_waiver_granted/revoked), so no changes were needed there. Added test coverage: invoice_expired creator payload, invoice_refunded total payload, and funds_unlocked firing at the exact unlock ledger via release_to_recipient (plus a should_panic guard for the still-locked case).
|
@GenesisPray Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No InvoiceExt2::creator_fee_bps field or mutation path exists in this contract (fees are governed by a global platform_fee_bps plus a boolean per-creator waiver list, which already emits fee_waiver_granted/revoked), so no changes were needed there.
Added test coverage: invoice_expired creator payload, invoice_refunded total payload, and funds_unlocked firing at the exact unlock ledger via release_to_recipient (plus a should_panic guard for the still-locked case).
closes #607
closes #608
closes #609
closes #610