ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

`getinfo` - LND Channels formatted output optimization #1940

Closed kilrau closed 4 years ago

kilrau commented 4 years ago

Currently the lnd channel overview shows 3 values: Active, Pending, Closed no matter if any of these categories actually have channels. In the example below I just started the environment and my channels were inactive for some minutes - I couldn't see them in the formatted output.

Formatted:

├──────────┼───────────────────────────────────────────────────────────────────────┤
│ Channels │ Active: 0 | Pending: 0 | Closed: 2                                    │
├──────────┼───────────────────────────────────────────────────────────────────────┤

JSON:

        "channels": {
          "active": 0,
          "inactive": 1,
          "pending": 0,
          "closed": 2
        },

This issue is about showing Pending, Inactive & Closed channels if there are non-zero values for these fields in the formatted output, don't show these if the value is 0. Active is always shown, no matter if zero or non-zero.