Include token in payment event; add invoice_frozen and allowlist_removed events - #656
Open
Onomebello wants to merge 1 commit into
Conversation
…moved events - payment_received event now carries the funding token address alongside payer/amount/seq, updated across all seven call sites (standard pay, multi-recipient pay, token pay, bridge pay, pool pay, delegated pay, and pay-on-behalf-of). - invoice_cloned event now emits the ledger sequence number instead of empty data, so listeners can correlate clones to a point in time. - pause_invoice now also emits a new invoice_frozen event (creator, ledger) alongside the existing invoice_paused event. - Add remove_allowlist entrypoint to clear an invoice's entire payer allowlist in one call (reopening it to any payer) and emit a new allowlist_removed event; mirrors the existing add/remove_allowed_payer auth and pause checks.
|
@Onomebello 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.
Summary
payment_receivedevents now include the funding token address (in addition to payer/amount/seq), updated consistently across all seven call sites: standard pay, multi-recipient pay, token pay, bridge pay, pool pay, delegated pay, and pay-on-behalf-of. This lets off-chain listeners disambiguate payments on invoices/pools that can be funded in more than one token without a separate lookup.invoice_clonednow emits the ledger sequence number as its event data instead of an empty tuple, so clone events can be correlated to a point in time.pause_invoicenow also emits a newinvoice_frozenevent ((creator, ledger)) alongside the existinginvoice_pausedevent, giving indexers a dedicated topic to key off of for freeze transitions.remove_allowlistentrypoint clears an invoice's entire payer allowlist in a single call (reopening it to any payer) and emits a newallowlist_removedevent. It mirrors the existingadd_allowed_payer/remove_allowed_payerauth (creator or co-creator) and pause checks, and is a no-op (no event) if the invoice is already open.Test plan
test_pause_invoice_emits_frozen_event— asserts the newfrozentopic is emitted on pause.test_clone_invoice_emits_ledger_sequence_in_event_data— asserts theclonedevent data decodes to the ledger sequence at clone time.test_remove_allowlist_opens_invoice_and_emits_event— asserts allowlist clears,al_openevent fires, and a previously non-allowed payer can then pay.cargo test -p split(no Rust toolchain available in this environment — please run in CI)closes Add
ledger_sequencetoinvoice_clonedevent data #602closes Emit event when an invoice's
allowed_payerslist is cleared #601closes Emit event when an invoice is frozen by the creator #599
closes Emit event when an invoice's
allowed_payerslist is cleared #601