aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-26 12:19:39 -0800
committerAdam Soltys <[email protected]>2024-01-26 12:19:39 -0800
commit77b9560d8faccdcd3c8fbdfa1d4cf1d67b4c91c8 (patch)
tree14d40d2de8cd2749e58281f4160693e05f5b6b27 /routes
parent2be8d6816f46eb1b980573a13079a072a91acb36 (diff)
downloadcoinos-server-77b9560d8faccdcd3c8fbdfa1d4cf1d67b4c91c8.tar.gz
coinos-server-77b9560d8faccdcd3c8fbdfa1d4cf1d67b4c91c8.zip
define invoice id
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.js6
1 files changed, 3 insertions, 3 deletions
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);
}
},