Skip to content

Commit

Permalink
fix: show LND info while it is out of sync
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Oct 14, 2019
1 parent 04dfdd9 commit 8529f34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/lndclient/LndClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ class LndClient extends SwapClient {
let status = 'Ready';
if (this.isDisabled()) {
status = errors.DISABLED(this.currency).message;
} else if (!this.isConnected()) {
status = errors.UNAVAILABLE(this.currency, this.status).message;
} else {
try {
const getInfoResponse = await this.getInfo();
Expand All @@ -238,7 +236,10 @@ class LndClient extends SwapClient {
uris = getInfoResponse.getUrisList();
version = getInfoResponse.getVersion();
alias = getInfoResponse.getAlias();
if (channels.active <= 0) {

if (!this.isConnected()) {
status = errors.UNAVAILABLE(this.currency, this.status).message;
} else if (channels.active <= 0) {
status = errors.NO_ACTIVE_CHANNELS(this.currency).message;
}
} catch (err) {
Expand Down

0 comments on commit 8529f34

Please sign in to comment.