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

Maybe we should mark which coins are confirmed but not yet spendable in the balance? #676

Open
danielabrozzoni opened this issue Jul 20, 2022 · 1 comment
Labels
discussion There's still a discussion ongoing module-wallet new feature New feature or request

Comments

@danielabrozzoni
Copy link
Member

See #640 (comment)

The idea is that if I have 10BTC in my wallet which are confirmed, but I'll be able to spend it only in a few months, then maybe get_balance should reflect that, and count the coins as locked or something.

This would mean passing a policy to get_balance so that it knows with which descriptor policy we would like to spend our coins.

Since this is a pretty advanced feature, maybe we should consider adding another API (get_balance_with_policy or something), so that normal users can just use get_balance and be fine.

@danielabrozzoni danielabrozzoni added new feature New feature or request discussion There's still a discussion ongoing module-wallet labels Jul 20, 2022
@rajarshimaitra
Copy link
Contributor

The only scenario I can think of where this will be applicable is when coins are "locked".. And if they are we can we should be able to see that in the transaction list itself?? In that case we can add one more extra special category of "locked coins". And to keep things simple it can be simply None for most of the general cases, only will have value when locked coins are identified.. And I feel this should be possible to achieve without getting policy into get_balance().. Our wallet should be able to figure from its db if any such coins exists..

Having another API for this would be confusing imo.. But having this would be really cool..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion There's still a discussion ongoing module-wallet new feature New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants