mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 19:27:17 +01:00
#1240 wrote a PAYMENT_SEND_FAILED audit row for every send the wallet rejected. #1249 then made a timeout read "unconfirmed — it may still go through" on screen, because a retry mints a new invoice and pays twice. The two met in payOverNwc with the record written BEFORE the timeout check, so the screen said "may have paid" while the record said "failed". The outcome is now classified first and written as it is: - timeout -> PAYMENT_SEND_UNCONFIRMED with success = null (unknown); - any other rejection -> PAYMENT_SEND_FAILED with success = false. auditLog wrote `entry.success ?? true`, which turns an explicit null into true, so "unknown" would have been stored as "succeeded". It now defaults only an OMITTED outcome to true and keeps null. Both guards proved by mutation: restoring `??` and logging timeouts as FAILED each turn one new test red. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>