aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/payments.js b/lib/payments.js
index e946e41e..657590ee 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -4,7 +4,7 @@ import { emit } from "$lib/sockets";
import { v4 } from "uuid";
import { notify } from "$lib/notifications";
import { db, g, s, t } from "$lib/db";
-import { l, err } from "$lib/logging";
+import { l, err, warn } from "$lib/logging";
import { fail } from "$lib/utils";
import { callWebhook } from "$lib/webhooks";
@@ -81,7 +81,7 @@ export let debit = async (
export let credit = async (hash, amount, memo, ref, type = types.internal) => {
amount = parseInt(amount);
let invoice = await g(`invoice:${hash}`);
- if (!invoice) return;
+ if (!invoice) return warn("failed to credit", ref, ", invoice not found");
if (!memo) ({ memo } = invoice);
let user = await g(`user:${invoice.uid}`);