From 3e1b5c2d251c6c4de2ee76915454ff94c16c0b50 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 19 Jul 2020 22:20:37 -0700 Subject: subtract fee from ln total --- lib/send.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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); }); -- cgit v1.2.3