From f62d5b5c6233510576df0e934d422395b9957833 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 10 Sep 2022 13:33:55 -0400 Subject: handle missing pr --- routes/lnurl.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'routes/lnurl.js') diff --git a/routes/lnurl.js b/routes/lnurl.js index a0d2a6d0..6eab008a 100644 --- a/routes/lnurl.js +++ b/routes/lnurl.js @@ -22,6 +22,8 @@ import { conversionFeeReceiver } from "./lightning/conversionFee.js"; +import send from "$lib/send"; + const logins = persist("data/logins.json"); const recipients = persist("data/recipients.json"); const lnurlPayments = persist("data/payments.json"); @@ -196,6 +198,7 @@ app.post("/pay", auth, async (req, res, next) => { if (recipients[secret]) { url = `${req.protocol}://${req.get("host")}/api/send`; + console.log(url); const { data } = await axios.post( url, { @@ -216,6 +219,7 @@ app.post("/pay", auth, async (req, res, next) => { res.send(await send(amount, "", data.pr, user)); } } catch (e) { + console.log(e); err("failed to send payment", e.message); res.code(500).send(e.message); } -- cgit v1.2.3