From 77b9560d8faccdcd3c8fbdfa1d4cf1d67b4c91c8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 26 Jan 2024 12:19:39 -0800 Subject: define invoice id --- routes/payments.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routes') diff --git a/routes/payments.js b/routes/payments.js index edcc6b72..fbd20ddb 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -4,7 +4,7 @@ import { emit } from "$lib/sockets"; import { v4 } from "uuid"; import { db, g, s, t } from "$lib/db"; import { l, err, warn } from "$lib/logging"; -import { bail, fail, btc, sats, SATS } from "$lib/utils"; +import { bail, fail, getInvoice, btc, sats, SATS } from "$lib/utils"; import { requirePin } from "$lib/auth"; import { debit, @@ -78,8 +78,8 @@ export default { res.send(p); } catch (e) { - warn(e.message); - warn("failed to create payment", user.username, amount, hash, payreq); + warn(user.username, "payment failed", amount, hash, payreq); + err(e.message); bail(res, e.message); } }, -- cgit v1.2.3