aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.js2
1 files changed, 1 insertions, 1 deletions
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
}