-
Notifications
You must be signed in to change notification settings - Fork 385
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
Add helper for getting claimable balance #2333
Add helper for getting claimable balance #2333
Conversation
5cc662b
to
3a85afd
Compare
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2333 +/- ##
==========================================
+ Coverage 90.34% 90.37% +0.03%
==========================================
Files 104 104
Lines 53392 53782 +390
Branches 53392 53782 +390
==========================================
+ Hits 48237 48607 +370
- Misses 5155 5175 +20
☔ View full report in Codecov by Sentry. |
Hmmmmm, I want to better understand the use-case here - are you intending to use the Lack of a global "what is my total balance, man" method is something we've needed for a while, but I'm not sure |
The use case is basically to get rid of this giant match statement here: https://github.com/MutinyWallet/mutiny-node/blob/2c9436bd5eca5916d3c3812034314d97abcda124/mutiny-core/src/nodemanager.rs#L1025 We want to see the amount we are going to get back from force closes |
Mmm, then we probably want to 0 out the |
Yeah maybe this is better as a function to the channel manager as something like Edit: doesn't seem possible because we don't have the chain monitor available :( |
It is annoying to have to match across all the enums of `Balance` to just pull out the `claimable_amount_satoshis` value. This helper makes it easier if you just want to amount.
3a85afd
to
06c6750
Compare
Excluded |
It is annoying to have to match across all the enums of
Balance
to just pull out theclaimable_amount_satoshis
value. This helper makes it easier if you just want to amount.