aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-07-09 12:58:14 -0700
committerAdam Soltys <[email protected]>2021-07-09 12:58:14 -0700
commit4bde8faf1b9d91898447bdf2c63b0afd227f978c (patch)
tree7feb055b4c5434e253b351655fe1ad4a2d7fd92f /routes/lightning
parent0fb703b85d99c888d1df971e7c3562f7918e0ff8 (diff)
downloadcoinos-server-4bde8faf1b9d91898447bdf2c63b0afd227f978c.tar.gz
coinos-server-4bde8faf1b9d91898447bdf2c63b0afd227f978c.zip
add webhooks to invoices
Diffstat (limited to 'routes/lightning')
-rw-r--r--routes/lightning/receive.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index 55193d2d..32c54de6 100644
--- a/routes/lightning/receive.js
+++ b/routes/lightning/receive.js
@@ -69,6 +69,8 @@ const handlePayment = async msg => {
payment = payment.get({ plain: true });
payment.account = account.get({ plain: true });
+ await callWebhook(invoice, payment);
+
emit(user.username, "payment", payment);
emit(user.username, "account", payment.account);
notify(user, `Received ${total} SAT`);