aboutsummaryrefslogtreecommitdiffstats
path: root/src/nwc-respond.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/nwc-respond.js')
-rw-r--r--src/nwc-respond.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nwc-respond.js b/src/nwc-respond.js
index bab25b0..0ebf361 100644
--- a/src/nwc-respond.js
+++ b/src/nwc-respond.js
@@ -291,7 +291,7 @@ export async function respondFromBg(data, {
} catch (e) {
return failQuietly(e.message);
}
- a = mgr.lnAction(id);
+ a = await mgr.awaitLnPay(id, Math.max(1000, deadline - Date.now())).catch(() => mgr.lnAction(id));
while (a && !['done', 'failed'].includes(a.step) && Date.now() < deadline) {
await new Promise((r) => setTimeout(r, 1500));
await mgr.driveLn(id).catch(() => {});