aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning
diff options
context:
space:
mode:
authorDerrick Schwabe <[email protected]>2022-05-01 16:22:16 -0600
committerDerrick Schwabe <[email protected]>2022-05-01 16:22:16 -0600
commit49561e914cc5d3cb21262cac0e96e5c295d8049c (patch)
treeba6816433c379b319763928e46b7da4b25ca04e1 /routes/lightning
parentb7a3b0bc84a18265a5a90aba606c15094ca76c57 (diff)
parentc80408c08ff2a8ca31df5ef3c7c9df13c9f714e4 (diff)
downloadcoinos-server-49561e914cc5d3cb21262cac0e96e5c295d8049c.tar.gz
coinos-server-49561e914cc5d3cb21262cac0e96e5c295d8049c.zip
Merge remote-tracking branch 'origin/master' into stageUpdate2
Diffstat (limited to 'routes/lightning')
-rw-r--r--routes/lightning/receive.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index ffc0ae03..6723d577 100644
--- a/routes/lightning/receive.js
+++ b/routes/lightning/receive.js
@@ -1,4 +1,5 @@
const handlePayment = async (msg) => {
+ l.info("incoming lightning payment", msg.value, msg.payment_request, msg.settled);
if (!msg.settled) return;
let account, total, user;
@@ -15,7 +16,7 @@ const handlePayment = async (msg) => {
await db.transaction(async (transaction) => {
const { text: hash, currency, memo, rate, tip, user_id } = invoice;
const amount = parseInt(msg.amt_paid_sat) - tip;
- if (amount > 10000000 || amount < 0)
+ if (amount < 0)
throw new Error("amount out of range");
account = await db.Account.findOne({