From 6a3db2fd1601d62eee10333392e74b48d4b9cb34 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 9 Feb 2023 22:45:03 -0800 Subject: fix fee calculation --- routes/payments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/payments.js b/routes/payments.js index 40a498e5..02620ed4 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -57,7 +57,7 @@ export default { p.amount = -amount; p.hash = r.payment_hash; - p.fee = r.msatoshi_sent - r.msatoshi; + p.fee = Math.round((r.msatoshi_sent - r.msatoshi) / 1000); p.ref = r.payment_preimage; await s(`payment:${p.id}`, p); -- cgit v1.2.3