feat: implement #522 #523 #524 #525 invoice enhancements - #567
Merged
Kingsman-99 merged 3 commits intoJul 30, 2026
Merged
Conversation
…tellar-split#525 invoice enhancements Stellar-split#522 — Cross-Invoice Split Linkage - Add parent_invoice_id: Option<u64> to Invoice struct - Block _release if parent is not Released/Finalised - Detect invalid/too-deep parent chains at creation time (MAX_PARENT_DEPTH=10) - Emit ChildInvoiceUnblocked(child_id, parent_id) on successful child release - Add ParentInvoiceNotFinalised, CircularParentReference, ParentChainTooDeep errors Stellar-split#523 — Late Payment Penalty Fee - Add late_penalty_bps: u32 to Invoice struct - Accept contributions within GRACE_WINDOW (86400s) after deadline - Charge ceil(amount * bps / 10000) penalty and transfer to treasury - Emit LatePaymentPenaltyCharged(invoice_id, payer, penalty_amount) - Zero bps disables penalty; on-time payments unaffected Stellar-split#524 — Invoice Batch Creation - Add InvoiceParams struct mirroring create_invoice params - Add batch_create_invoices(invoices: Vec<InvoiceParams>) -> Vec<u64> - Enforce MAX_BATCH_SIZE=50; return BatchTooLarge error if exceeded - Emit individual InvoiceCreated per entry + one BatchInvoiceCreated - Atomic: all succeed or transaction aborts Stellar-split#525 — Recipient Share Precision Rounding - Add calc.rs module with distribute_with_remainder (largest-remainder method) - Guarantees sum(shares) == total for any input (no stroop lost) - Largest fractional remainder recipients receive the extra stroop - Fully unit-tested in calc.rs including property-based test - _release uses distribute_with_remainder for all payouts chore: update .gitignore with test snapshots, IDE, OS, and stellar-cli artifacts
|
@obedebuka41-dotcom 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! 🚀 |
6 tasks
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.
#522 — Cross-Invoice Split Linkage
#523 — Late Payment Penalty Fee
#524 — Invoice Batch Creation
#525 — Recipient Share Precision Rounding
chore: update .gitignore with test snapshots, IDE, OS, and stellar-cli artifacts
close #522
close #523
close #524
close #525