Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #740 from mrfelton/fix/lnd-connect-failure-state
Browse files Browse the repository at this point in the history
fix(fsm): ensure lnd connect before state change
  • Loading branch information
JimmyMow committed Sep 5, 2018
2 parents 07a070b + bfb8b6d commit d42987b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/lib/zap/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ class ZapController {
this.sendMessage('startOnboarding', this.lndConfig)
}

onStartLnd() {
mainLog.debug('[FSM] onStartLnd...')
onBeforeStartLnd() {
mainLog.debug('[FSM] onBeforeStartLnd...')

return isLndRunning().then(res => {
if (res) {
Expand All @@ -168,8 +168,8 @@ class ZapController {
})
}

onConnectLnd() {
mainLog.debug('[FSM] onConnectLnd...')
onBeforeConnectLnd() {
mainLog.debug('[FSM] onBeforeConnectLnd...')
mainLog.info('Connecting to custom lnd instance')
mainLog.info(' > host:', this.lndConfig.host)
mainLog.info(' > cert:', this.lndConfig.cert)
Expand Down Expand Up @@ -197,7 +197,8 @@ class ZapController {
}

// Notify the app of errors.
return this.sendMessage('startLndError', errors)
this.sendMessage('startLndError', errors)
throw e
})
}

Expand Down

0 comments on commit d42987b

Please sign in to comment.