From 23c8b11bd3c1dee56781cc83e65e077409c0858e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 21 Sep 2026 19:41:31 -0700 Subject: lightning: log quote outcomes The quote endpoint only logged failures, so a "send everything" that went wrong somewhere after the quote left nothing to correlate against. Log the solved amount and fees for max quotes and the fee for plain ones. Co-Authored-By: Claude Fable 5.1 --- routes/payments.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/payments.ts b/routes/payments.ts index 5fc927b2..6ae88475 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -957,6 +957,7 @@ export default { const { fee } = await quoteRoutingFee({ pr: fetched, amount: q.amount }); if (fee !== q.fee) fail("Routing fee changed, please try again"); } + l("quote max", user.username, q.amount, "fee", q.fee, "ourfee", q.ourfee, "balance", q.balance); return res.send({ ...q, ...(fetched ? { payreq: fetched } : {}) }); } @@ -966,6 +967,7 @@ export default { fail("Amount does not match invoice"); const { fee, parts } = await quoteRoutingFee({ pr, amount: a }); const ourfee = await platformFee({ uid: user.id, aid, amount: a, fee }); + l("quote", user.username, a, "fee", fee, "ourfee", ourfee, "parts", parts); res.send({ amount: a, fee, -- cgit v1.2.3