aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lightning.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
committerAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
commitad7b09b43323d0ffc0a8ddabb43e4838a184c697 (patch)
treefbf2a59f81771b2938f474c8e7b35a497d2960e4 /lib/lightning.ts
parent9e97e040617bfa0b40150c0eba298bf186bbeeaf (diff)
downloadcoinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.tar.gz
coinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.zip
formatting
Diffstat (limited to 'lib/lightning.ts')
-rw-r--r--lib/lightning.ts16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/lightning.ts b/lib/lightning.ts
index 4824d9ab..a259b601 100644
--- a/lib/lightning.ts
+++ b/lib/lightning.ts
@@ -66,8 +66,7 @@ export async function listenForLightning() {
handleZap(inv, pubkey);
}
} catch (e) {
- if (!e.message.includes("Unexpected"))
- warn("failed to handle zap", e.message);
+ if (!e.message.includes("Unexpected")) warn("failed to handle zap", e.message);
}
}
@@ -88,11 +87,7 @@ export async function listenForLightning() {
const errorCode = e?.code ?? e?.errno ?? "unknown";
const errorMsg = e?.message ?? String(e);
- err(
- `lightning listener: error waiting for invoice`,
- `code=${errorCode}`,
- `error=${errorMsg}`
- );
+ err(`lightning listener: error waiting for invoice`, `code=${errorCode}`, `error=${errorMsg}`);
if (e instanceof LightningUnavailableError) {
err("lightning listener: RPC socket unavailable");
@@ -103,7 +98,7 @@ export async function listenForLightning() {
if (listenerRetries >= MAX_LISTENER_RETRIES) {
err(
`lightning listener: ${MAX_LISTENER_RETRIES} consecutive failures, ` +
- `last error: ${errorMsg}`
+ `last error: ${errorMsg}`,
);
err("lightning listener: exiting process to trigger container restart");
@@ -115,7 +110,7 @@ export async function listenForLightning() {
warn(
`lightning listener: retry ${listenerRetries}/${MAX_LISTENER_RETRIES} ` +
- `in ${LISTENER_RETRY_DELAY / 1000}s`
+ `in ${LISTENER_RETRY_DELAY / 1000}s`,
);
setTimeout(listenForLightning, LISTENER_RETRY_DELAY);
}
@@ -150,8 +145,7 @@ export async function replay(index) {
handleZap(inv, pubkey);
}
} catch (e) {
- if (!e.message.includes("Unexpected"))
- warn("failed to handle zap", e.message);
+ if (!e.message.includes("Unexpected")) warn("failed to handle zap", e.message);
}
}