Skip to content

fix(events): remove malformed duplicate invoice_expired definition - #720

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
ayomidearegbeshola29-dev:fix/events-rs-dup-invoice-expired
Aug 30, 2026
Merged

fix(events): remove malformed duplicate invoice_expired definition#720
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
ayomidearegbeshola29-dev:fix/events-rs-dup-invoice-expired

Conversation

@ayomidearegbeshola29-dev

Copy link
Copy Markdown

Fix malformed duplicate invoice_expired definition in events.rs

Summary

This PR fixes a pre-existing compile error on main in
contracts/split/src/events.rs. There were two definitions of
invoice_expired:

  • The first (5-arg) form was malformed: its env.events().publish(...)
    call was missing the closing ) and the closing } of the function, and the
    second pub fn invoice_expired began inside that unterminated call.
  • The second (4-arg) form was a stray duplicate.

The only caller (lib.rs:11004) invokes invoice_expired(&env, invoice_id, deadline, funded, &invoice.creator) — the 5-arg form — so the intended
function is the first one. This PR keeps that form and removes the malformed
tail + the duplicate, yielding a single, correctly-terminated function.

Before

pub fn invoice_expired(env: &Env, invoice_id: u64, deadline: u64, funded: i128, creator: &Address) {
    env.events().publish(
        ( symbol_short!("split"), symbol_short!("expired"), invoice_id ),
        (deadline, funded, creator.clone()),
/// Data: (deadline, funded)
pub fn invoice_expired(env: &Env, invoice_id: u64, deadline: u64, funded: i128) {
    ...

After

pub fn invoice_expired(env: &Env, invoice_id: u64, deadline: u64, funded: i128, creator: &Address) {
    env.events().publish(
        ( symbol_short!("split"), symbol_short!("expired"), invoice_id ),
        (deadline, funded, creator.clone()),
    );
}

Verification

Resolves the unclosed delimiter parse error at events.rs:1821, which was
blocking cargo check for the whole split crate. (Note: additional, unrelated
compile errors remain on main from other unimplemented helpers/variants that
are tracked by their own issues; this PR addresses only the duplicate-function
parse error.)

This is a housekeeping fix for a pre-existing parse error and is not tied to a
specific campaign issue; it is opened to unblock cargo check on main.

@Kingsman-99
Kingsman-99 merged commit 60e18fc into Stellar-split:main Aug 30, 2026
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.

2 participants