diff options
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/receive.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 325f7092..6b8a9077 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -18,7 +18,8 @@ const handlePayment = async msg => { const { text: hash, currency, memo, rate, tip, user_id } = invoice; const amount = parseInt(msg.amt_paid_sat) - tip; - if (amount > 10000000 || amount < 0) throw new Error("amount out of range"); + if (amount > 10000000 || amount < 0) + throw new Error("amount out of range"); account = await db.Account.findOne({ where: { @@ -82,18 +83,17 @@ const handlePayment = async msg => { let c = convert[msg.payment_request]; if (c) { - let { address, tx } = c; user.account = account; try { await sendLiquid({ - address, + address: c.address, + amount: total - 100, user, - tx, limit: total }); } catch (e) { - l.error("problem sending liquid payment"); + l.error("problem sending liquid payment", e.message, e.stack); } } } catch (e) { |
