aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/payments.ts')
-rw-r--r--lib/payments.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index 52319c8d..66f536bc 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -371,11 +371,9 @@ export const completePayment = async (inv, p, user) => {
inv.forwarded = true;
await s(`invoice:${inv.id}`, inv);
- // Skip forward if destination is the same user's own Lightning invoice
- if (inv.forward.startsWith("ln")) {
- const destInv = await getInvoice(inv.forward).catch(() => null);
- if (destInv?.uid === id) return;
- }
+ // Skip forward if destination belongs to the same user
+ const destInv = await getInvoice(inv.forward).catch(() => null);
+ if (destInv?.uid === id) return;
await pay({ amount: p.amount, to: inv.forward, user });
} catch (e) {