Skip to content

Conversation

@im-adithya
Copy link
Member

@im-adithya im-adithya commented Mar 24, 2025

Fixes #1183

We introduce a new internal variable called includeInactiveChannels in the LNClient GetBalances call. But we only set it to true in the GetBalancesController so that we only return offline channel balance externally (so as to not trouble the user).

Internally (in the Hub) they'll see the reduced balance but the user will anyways be informed about their offline channel from the indicator so it shouldn't be an issue.

Testing

Tested in both LND and LDK by disconnecting peers. NWC get_balance includes offline channel balances as well as intended 👍

@im-adithya im-adithya requested a review from rolznz March 24, 2025 10:24
Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK (Update: tested LDK)

@rolznz rolznz merged commit ae87f3a into master Mar 24, 2025
11 checks passed
@rolznz rolznz deleted the fix/offline-balance branch March 24, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include offline channel balance in nwc get_balance

3 participants