aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-21 19:41:31 -0700
committerAdam Soltys <[email protected]>2026-09-21 19:41:33 -0700
commit23c8b11bd3c1dee56781cc83e65e077409c0858e (patch)
treef600be239f20c182000c9e775a8788dfa4229243 /routes
parentd128ee51c292c331ea1f26d745a5fc280fb3f439 (diff)
downloadcoinos-server-23c8b11bd3c1dee56781cc83e65e077409c0858e.tar.gz
coinos-server-23c8b11bd3c1dee56781cc83e65e077409c0858e.zip
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 <[email protected]>
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.ts2
1 files changed, 2 insertions, 0 deletions
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,