Skip to content

Enrich refund/expiry events and fix funds_unlocked gap - #657

Open
GenesisPray wants to merge 2 commits into
Stellar-split:mainfrom
GenesisPray:feature/event-payload-transparency
Open

Enrich refund/expiry events and fix funds_unlocked gap#657
GenesisPray wants to merge 2 commits into
Stellar-split:mainfrom
GenesisPray:feature/event-payload-transparency

Conversation

@GenesisPray

Copy link
Copy Markdown
Contributor
  • 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).

closes #607
closes #608
closes #609
closes #610

- 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).
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

1 participant