Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display total balance if recv_only is enabled #7

Merged

Conversation

alfonsoromanz
Copy link
Contributor

Hey. Thanks for putting this tool together.

I want to use the tool to query my LND balance from another application. I noticed that the balance returned is based on a daily spending limit rather than the actual balance of the node. I propose a change to display the real node balance when the tool is set up in recv_only mode. This would provide a more accurate representation of the node's balance in scenarios where receiving is the primary function.

Also, it might not make much sense to display the default daily spending limit as the balance if it's set to receive only. What do you think?

Copy link
Owner

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

need to fix formatting too, otherwise this makes sense to me

src/main.rs Outdated
Comment on lines 526 to 527
let channel_balance_request = ChannelBalanceRequest {};
let channel_balance_response = lnd.channel_balance(channel_balance_request).await?.into_inner();
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
let channel_balance_request = ChannelBalanceRequest {};
let channel_balance_response = lnd.channel_balance(channel_balance_request).await?.into_inner();
let channel_balance_response = lnd.channel_balance(ChannelBalanceRequest {}).await?.into_inner();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks

@alfonsoromanz alfonsoromanz force-pushed the total_balance_when_recv_only branch from 0f2bc96 to 51d1b2a Compare November 25, 2024 20:00
@alfonsoromanz
Copy link
Contributor Author

Addressed feedback in 51d1b2a. Thanks

@benthecarman benthecarman merged commit 6e8624f into benthecarman:master Nov 25, 2024
1 check passed
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.

2 participants