Skip to content

feat(contracts): add creator-controlled invoice pause mechanism#170

Merged
Kingsman-99 merged 3 commits into
Stellar-split:mainfrom
luhrhenz:feat/invoice-pause-mechanism
Jun 20, 2026
Merged

feat(contracts): add creator-controlled invoice pause mechanism#170
Kingsman-99 merged 3 commits into
Stellar-split:mainfrom
luhrhenz:feat/invoice-pause-mechanism

Conversation

@luhrhenz

@luhrhenz luhrhenz commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

closes #164

luhrhenz and others added 3 commits June 20, 2026 15:06
Implements pause_invoice, resume_invoice, and admin_force_resume entry
points with lazy auto-resume in _pay. Also fixes compilation errors left
by the merged rate-limiter PR (Stellar-split#168): missing fields, storage keys,
broken From impls, and incorrect test call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ct reference

Vec::new(&Env::default()) creates objects bound to a throwaway host;
passing them to a contract call on a different env caused the Soroban
"mis-tagged object reference" panic in all four rate-limiter tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Kingsman-99 Kingsman-99 merged commit 553db96 into Stellar-split:main Jun 20, 2026
1 check failed
Kingsman-99 added a commit that referenced this pull request Jun 24, 2026
… break

PR #170 added pause_reason/auto_resume_at/payment_cooldown_secs/
max_payments_per_window/payment_window_secs to Invoice but never wired them
into InvoiceExt/split()/assemble(), and called three events::invoice_*
functions that were never defined. Both are now fixed.

Also fixes CloneOverrides.new_overflow_behavior: Option<OverflowBehavior>
can never compile in a #[contracttype] struct (plain enums only get a
fallible TryFrom<ScVal>, not the infallible From that Option<T> requires).
Switched to Vec<OverflowBehavior> (0/1 elements), matching split-sdk's
client.ts wire format update.

Removed two unused dead-code helpers (save_invoice_ext/load_invoice_ext).

cargo build and cargo test (144/144) now pass clean.
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.

Implement creator-controlled invoice pause with time-locked auto-resume and audit trail

2 participants