Overview
The current release_funds disburses to all recipients at once. Add a partial release function so a creator can pay individual recipients progressively rather than all at once.
Acceptance Criteria
release_to_recipient(invoice_id: u64, recipient: Address) callable only by the creator
- Transfers only that recipient's share; marks them as paid in the invoice state
- Invoice must be fully funded before any partial release
release_funds still available for releasing all remaining unpaid recipients in one call
get_invoice adds paid_recipients: Vec<Address> to the invoice struct
- A recipient cannot be paid twice: second call throws
RecipientAlreadyPaid
- Emits
RecipientPaid { invoice_id, recipient, amount, ledger } per partial release
- Integration tests: pay 1 of 3 recipients, pay remaining 2, full release after partial
Overview
The current
release_fundsdisburses to all recipients at once. Add a partial release function so a creator can pay individual recipients progressively rather than all at once.Acceptance Criteria
release_to_recipient(invoice_id: u64, recipient: Address)callable only by the creatorrelease_fundsstill available for releasing all remaining unpaid recipients in one callget_invoiceaddspaid_recipients: Vec<Address>to the invoice structRecipientAlreadyPaidRecipientPaid { invoice_id, recipient, amount, ledger }per partial release