From c80408c08ff2a8ca31df5ef3c7c9df13c9f714e4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 30 Apr 2022 09:12:20 -0400 Subject: remove upper receive range limit for lightning --- routes/lightning/receive.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routes') 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({ -- cgit v1.2.3