From 97de1b7d9552d56a53c572b39fc7c7bc8cae242b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 5 Aug 2021 11:35:16 -0700 Subject: capture invoice for ln and lbtc payments --- routes/lightning/receive.js | 3 ++- routes/liquid/receive.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 39c5be15..8d1e8917 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -50,7 +50,8 @@ const handlePayment = async msg => { received: true, confirmed: true, network: "lightning", - tip + tip, + invoice_id: invoice.id }, { transaction } ); diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js index d3d4aec8..2c88075c 100644 --- a/routes/liquid/receive.js +++ b/routes/liquid/receive.js @@ -162,7 +162,8 @@ zmqRawTx.on("message", async (topic, message, sequence) => { tip, confirmed, address, - network: "liquid" + network: "liquid", + invoice_id: invoice.id }, { transaction } ); @@ -338,7 +339,7 @@ setInterval(async () => { ); notify(user, `${total} SAT payment confirmed`); - await callWebhook(p.invoice, p); + callWebhook(p.invoice, p); } else { l.warn("couldn't find liquid payment", hash); } -- cgit v1.2.3