Settlement service, escrow tx logging, publish validation, payment idempotency tests - #59
Merged
Chucks1093 merged 2 commits intoJul 27, 2026
Conversation
…ent idempotency tests - Add SettlementService that distributes proceeds pro-rata to confirmed investors and transitions invoices to SETTLED, plus a POST /api/v1/settlements/:invoiceId endpoint and integration test (StellarState#43) - Add structured debug/info/warn logging around Soroban escrow funding submission with contract_id, function_name, invoice_id, tx_hash and ledger, never amounts or wallet addresses (StellarState#42) - Add validateInvoiceForPublish helper and wire it into InvoiceService.publishInvoice, with unit tests covering all field combinations (StellarState#41) - Add unit tests asserting VerifyPaymentService dedupes by Stellar transaction hash before any database write (StellarState#40)
0xDeon
force-pushed
the
feat/settlement-escrow-logs-validation-idempotency
branch
from
July 27, 2026 11:48
b0e9a64 to
0e46ac6
Compare
|
@0xDeon 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! 🚀 |
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.
Summary
SettlementServicethat distributes proceeds pro-rata to confirmed investors and transitions invoices toSETTLED, plus aPOST /api/v1/settlements/:invoiceIdendpoint and an integration test covering multi-investor settlement.contract_id,function_name,invoice_id,tx_hash,ledger) with no amounts or wallet addresses logged.validateInvoiceForPublishhelper and wire it intoInvoiceService.publishInvoice, with unit tests covering all field combinations.VerifyPaymentServicededupes by Stellar transaction hash before any database write.Closes #43
Closes #42
Closes #41
Closes #40
Test plan
npm test— 22 suites / 162 tests passingnpm run lint— cleannpm run build— clean