Summary
The pool's fund_invoice checks both the invoice status and its own FundedInvoice key. There is no test verifying double-funding is prevented through both checks.
Current Behavior
fund_invoice at contracts/pool/src/lib.rs:351-467 checks invoice status and FundedInvoice key. If someone tries to fund an already-funded invoice, the pool's own check catches it. But there is no test for this scenario.
Expected Behavior
Add tests for calling fund_invoice twice with the same invoice, and for calling fund_invoice after repayment/default.
Acceptance Criteria
Tech Stack
contracts/pool/src/test.rs
Summary
The pool's
fund_invoicechecks both the invoice status and its ownFundedInvoicekey. There is no test verifying double-funding is prevented through both checks.Current Behavior
fund_invoiceatcontracts/pool/src/lib.rs:351-467checks invoice status andFundedInvoicekey. If someone tries to fund an already-funded invoice, the pool's own check catches it. But there is no test for this scenario.Expected Behavior
Add tests for calling
fund_invoicetwice with the same invoice, and for callingfund_invoiceafter repayment/default.Acceptance Criteria
Tech Stack
contracts/pool/src/test.rs