aboutsummaryrefslogtreecommitdiffstats
path: root/lib/nwc.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-13 10:18:04 -0800
committerAdam Soltys <[email protected]>2025-02-13 10:18:04 -0800
commit1888e338f2ccef16ccdb738cfdd04ffe516e023a (patch)
treeb3376733f9cdd80099ff2362974dc43075c66af9 /lib/nwc.ts
parentb8cfc175d924a467b7c3d43e2e9b24b6b3703007 (diff)
downloadcoinos-server-1888e338f2ccef16ccdb738cfdd04ffe516e023a.tar.gz
coinos-server-1888e338f2ccef16ccdb738cfdd04ffe516e023a.zip
add uid to default app
Diffstat (limited to 'lib/nwc.ts')
-rw-r--r--lib/nwc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/nwc.ts b/lib/nwc.ts
index 53cda3b4..f92017d8 100644
--- a/lib/nwc.ts
+++ b/lib/nwc.ts
@@ -123,6 +123,7 @@ const handle = (method, params, ev, app, user) =>
(a, b) =>
a +
(Math.abs(parseInt(b.amount || 0)) +
+ parseInt(b.tip || 0) +
parseInt(b.fee || 0) +
parseInt(b.ourfee || 0)),
0,
@@ -348,7 +349,7 @@ const handle = (method, params, ev, app, user) =>
description: p.memo,
preimage: p.ref,
payment_hash,
- amount: Math.abs(p.amount * 1000),
+ amount: (Math.abs(p.amount) + p.tip) * 1000,
fees_paid: p.fee * 1000,
created_at,
expires_at: created_at + week,