From 7fc51785cd190f51f5ef7cfbcb262a238b68e175 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 2 Dec 2024 22:06:01 -0800 Subject: keysend --- lib/nwc.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/nwc.ts') diff --git a/lib/nwc.ts b/lib/nwc.ts index 3f6f24e7..5432cc62 100644 --- a/lib/nwc.ts +++ b/lib/nwc.ts @@ -143,15 +143,14 @@ const handle = (method, params, user) => async pay_keysend() { const { amount, pubkey } = params; - await sendKeysend({ + const { payment_hash } = await sendKeysend({ amount, pubkey, - fee: Math.max(5, Math.round(amount * 0.005)), user, }); for (let i = 0; i < 10; i++) { - const { pays } = await ln.listpays(pr); + const { pays } = await ln.listpays({ payment_hash }); const p = pays.find((p) => p.status === "complete"); if (p) { const { preimage } = p; -- cgit v1.2.3