File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function App() {
1212 const isConnected = ( ) => console . log ( lnc . isConnected ) ;
1313 const isReady = ( ) => console . log ( lnc . isReady ) ;
1414 const load = ( ) => lnc . preload ( ) ;
15+ const run = ( ) => lnc . run ( ) ;
1516 const connect = ( ) => lnc . connect ( ) ;
1617 const disconnect = ( ) => lnc . disconnect ( ) ;
1718
@@ -85,6 +86,7 @@ function App() {
8586 < button onClick = { ( ) => isReady ( ) } > isReady</ button >
8687 < button onClick = { ( ) => isConnected ( ) } > isConnected</ button >
8788 < button onClick = { ( ) => load ( ) } > Load</ button >
89+ < button onClick = { ( ) => run ( ) } > Run</ button >
8890 < button onClick = { ( ) => connect ( ) } > Connect</ button >
8991 < button onClick = { ( ) => disconnect ( ) } > Disconnect</ button >
9092 < h1 > LND</ h1 >
Original file line number Diff line number Diff line change @@ -138,10 +138,11 @@ export default class LNC {
138138 // do not attempt to connect multiple times
139139 if ( this . isConnected ) return ;
140140
141- await this . run ( ) ;
142-
143141 // ensure the WASM binary is loaded
144- if ( ! this . isReady ) await this . waitTilReady ( ) ;
142+ if ( ! this . isReady ) {
143+ await this . run ( ) ;
144+ await this . waitTilReady ( ) ;
145+ }
145146
146147 const { pairingPhrase, localKey, remoteKey, serverHost } =
147148 this . credentials ;
You can’t perform that action at this time.
0 commit comments