From ab552d882ba9c0d2c99e104c79b2ce854c4d1da8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 19 Oct 2024 22:02:28 -0700 Subject: fix reverse --- lib/payments.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/payments.ts') diff --git a/lib/payments.ts b/lib/payments.ts index aeb16aa3..b01c926c 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -1,6 +1,5 @@ import config from "$config"; import { generate } from "$lib/invoices"; -import { emit } from "$lib/sockets"; import { v4 } from "uuid"; import { notify } from "$lib/notifications"; import { db, g, s } from "$lib/db"; @@ -257,11 +256,10 @@ export let completePayment = async (inv, p, user) => { } } - notify(p, user, withdrawal); } + notify(p, user, withdrawal); l(username, "received", p.type, p.amount); - emit(user.id, "payment", p); callWebhook(inv, p); }; @@ -486,7 +484,6 @@ export let sendLightning = async ({ console.log("failed to process payment", e, p); } } catch (e) { - await reverse(p); throw e; } -- cgit v1.2.3