From 74e6d5b3ca16e2d606ca162489d725add7528d21 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Mon, 12 May 2025 17:11:05 +0000 Subject: [PATCH] better unlock fix --- src/services/main/unlocker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/main/unlocker.ts b/src/services/main/unlocker.ts index 084fb533..2d0d623d 100644 --- a/src/services/main/unlocker.ts +++ b/src/services/main/unlocker.ts @@ -157,10 +157,10 @@ export class Unlocker { const info = await ln.getInfo({}, DeadLineMetadata()) return { ok: true, pub: info.response.identityPubkey } } catch (err: any) { - if (err.message === 'wallet locked, unlock it to enable full RPC access') { + if ((err.message as string).includes('wallet locked, unlock it to enable full RPC access')) { this.log("wallet is locked") return { ok: false, failure: 'locked' } - } else if (err.message === '2 UNKNOWN: the RPC server is in the process of starting up, but not yet ready to accept calls') { + } else if ((err.message as string).includes('the RPC server is in the process of starting up, but not yet ready to accept calls')) { this.log("lnd is not ready yet, waiting...") await new Promise((res) => setTimeout(res, 1000)) } else {