aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-09 22:45:03 -0800
committerAdam Soltys <[email protected]>2023-02-09 22:45:03 -0800
commit6a3db2fd1601d62eee10333392e74b48d4b9cb34 (patch)
treee37f3c7eed22391d14bb5e4466c0a87dff7a6b0e
parent75ae71955c000ad9458c8f80c61a74a4aa3fb951 (diff)
downloadcoinos-server-6a3db2fd1601d62eee10333392e74b48d4b9cb34.tar.gz
coinos-server-6a3db2fd1601d62eee10333392e74b48d4b9cb34.zip
fix fee calculation
-rw-r--r--routes/payments.js2
1 files changed, 1 insertions, 1 deletions
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);