From 5756d04533a69d93091dcbb469d83da6b55456bc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 24 Mar 2023 09:19:00 -0700 Subject: throw on incomplete payment --- routes/payments.js | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/payments.js b/routes/payments.js index a1204700..204b1d9d 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -72,6 +72,7 @@ export default { let r; try { r = await ln.pay(payreq, msatoshi ? undefined : `${amount}sats`); + if (r.status !== "complete") fail("payment did not complete"); p.amount = -amount; p.tip = total - amount; -- cgit v1.2.3