Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions contracts/split/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,23 @@ pub fn invoice_partially_released(env: &Env, invoice_id: u64, recipients: &Vec<A
recipients.clone(),
);
}

/// Emitted when a payment reminder is triggered.
/// Topics: (split, reminder, invoice_id)
/// Data: who
pub fn payment_reminder(env: &Env, invoice_id: u64, who: &Address) {
env.events().publish(
(symbol_short!("split"), symbol_short!("reminder"), invoice_id),
who.clone(),
);
}

/// Emitted when a payment is matched via memo.
/// Topics: (split, matched, invoice_id)
/// Data: (payer, memo)
pub fn payment_matched(env: &Env, invoice_id: u64, memo: u64, payer: &Address) {
env.events().publish(
(symbol_short!("split"), symbol_short!("matched"), invoice_id),
(memo, payer.clone()),
);
}
Loading
Loading