Skip to content

Commit 3162f23

Browse files
authored
Merge pull request #31 from lightninglabs/fix-run
lnc: fix error when calling connect after run
2 parents bb62104 + f3fa39f commit 3162f23

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,12 @@ export default class LNC {
405405
// do not attempt to connect multiple times
406406
if (this.isConnected) return;
407407

408-
await this.run();
409-
408+
410409
// ensure the WASM binary is loaded
411-
if (!this.isReady) await this.waitTilReady();
410+
if (!this.isReady) {
411+
await this.run();
412+
await this.waitTilReady();
413+
}
412414

413415
const { pairingPhrase, localKey, remoteKey } = this.loadKeys();
414416

0 commit comments

Comments
 (0)