aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-08-05 11:35:16 -0700
committerAdam Soltys <[email protected]>2021-08-05 11:35:16 -0700
commit97de1b7d9552d56a53c572b39fc7c7bc8cae242b (patch)
tree19e64fae9ba263434205107185a05968f591f081
parent5858323cf0bb920c9f967239b7a1ef7915cf0824 (diff)
downloadcoinos-server-97de1b7d9552d56a53c572b39fc7c7bc8cae242b.tar.gz
coinos-server-97de1b7d9552d56a53c572b39fc7c7bc8cae242b.zip
capture invoice for ln and lbtc payments
-rw-r--r--routes/lightning/receive.js3
-rw-r--r--routes/liquid/receive.js5
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);
}