diff options
| author | Adam Soltys <[email protected]> | 2022-10-05 12:15:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-05 12:15:48 -0700 |
| commit | fb91aa048617f0894e01c1e890ec957a3170539f (patch) | |
| tree | 5630fbe3bb5eb67fc0fba2bba79b8b763609d93a /routes/lightning | |
| parent | 160d95f693d7d8a17e864313b06790a841d4e160 (diff) | |
| download | coinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.tar.gz coinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.zip | |
prettier
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/receive.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 898152fe..2ca6f960 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -82,7 +82,7 @@ const handlePayment = async msg => { { transaction } ); await account.reload({ transaction }); - await invoice.save({ transaction }); + await invoice.reload({ transaction }); await payment.save({ transaction }); store.payments.push(msg.request); @@ -92,6 +92,8 @@ const handlePayment = async msg => { callWebhook(invoice, payment); + console.log("INVOICE", payment.invoice.received); + emit(user.username, "payment", payment); emit(user.username, "account", payment.account); notify(user, `Received ${total} SAT`); |
