From bcc333c351b76c485045c754b6a2a6950a7fecc8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 29 Nov 2018 14:43:03 -0800 Subject: use amount not payreq --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 79cb29b9..f6a02034 100644 --- a/index.js +++ b/index.js @@ -377,7 +377,7 @@ const l = console.log if (req.user.balance + req.user.channelbalance < amount - MINFEE) { return res.status(500).send('Not enough satoshis') } - req.user.channelbalance -= (payreq.satoshis - req.user.balance) + req.user.channelbalance -= ((amount - MINFEE) - req.user.balance) req.user.balance = 0 } -- cgit v1.2.3