aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-07-19 22:20:37 -0700
committerAdam Soltys <[email protected]>2020-07-19 22:20:37 -0700
commit3e1b5c2d251c6c4de2ee76915454ff94c16c0b50 (patch)
tree93c63f09f43ce05a9e7852bc07aa5e7bf8307e14 /lib
parent25029c1cf9b585f6354f9277c0f036e608c4bce7 (diff)
downloadcoinos-server-3e1b5c2d251c6c4de2ee76915454ff94c16c0b50.tar.gz
coinos-server-3e1b5c2d251c6c4de2ee76915454ff94c16c0b50.zip
subtract fee from ln total
Diffstat (limited to 'lib')
-rw-r--r--lib/send.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/send.js b/lib/send.js
index 7850da08..2e4f1f12 100644
--- a/lib/send.js
+++ b/lib/send.js
@@ -89,7 +89,7 @@ send = async (amount, memo, hash, user) => {
payment = await db.Payment.create(
{
- amount: -total,
+ amount: -(total - fee),
account_id: account.id,
user_id: user.id,
hash,
@@ -113,7 +113,7 @@ send = async (amount, memo, hash, user) => {
seen.push(preimage);
seen.push(hash);
- l.info("sent lightning", user.username, total);
+ l.info("sent lightning", user.username, (total - fee), fee);
});