diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ark.ts | 23 | ||||
| -rw-r--r-- | lib/health.ts | 4 |
2 files changed, 13 insertions, 14 deletions
@@ -73,16 +73,19 @@ export const refreshArkWallet = async (force = false) => { const dust = Number(info.dust); const recoverableDisplay = balance.recoverable > dust ? balance.recoverable : 0; - l( - "ark wallet check — available:", - balance.available, - "recoverable:", - recoverableDisplay, - "boarding:", - balance.boarding.confirmed, - "pending:", - balance.boarding.unconfirmed, - ); + + if (balance.available === 0 || recoverableDisplay > 0 || balance.boarding.unconfirmed > 0) { + l( + "ark wallet check — available:", + balance.available, + "recoverable:", + recoverableDisplay, + "boarding:", + balance.boarding.confirmed, + "pending:", + balance.boarding.unconfirmed, + ); + } // Recover swept/expired VTXOs (with backoff on repeated failures) const recoverableAboveDust = balance.recoverable > dust; diff --git a/lib/health.ts b/lib/health.ts index 9df90a46..5a2e63e2 100644 --- a/lib/health.ts +++ b/lib/health.ts @@ -40,7 +40,6 @@ async function checkLightningHealth(): Promise<boolean> { const startTime = Date.now(); try { - l("health check: testing lightning connection..."); const info = await withTimeout(ln.getinfo(), RPC_TIMEOUT, "getinfo") as any; if (!info?.id) { @@ -73,9 +72,6 @@ async function checkLightningHealth(): Promise<boolean> { // Ignore cleanup errors } - const duration = Date.now() - startTime; - l(`health check: passed in ${duration}ms, node: ${info.id.slice(0, 16)}...`); - return true; } catch (e: any) { const duration = Date.now() - startTime; |
