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

InsufficientFunds is duplicated within coin_selection::Error and CreateTxError enums #1440

Closed
e1a0a0ea opened this issue May 13, 2024 · 1 comment · Fixed by #1441
Closed
Labels
bug Something isn't working
Milestone

Comments

@e1a0a0ea
Copy link
Contributor

Describe the bug
Both coin_selection::Error and CreateTxError enums have an InsufficientFunds member. It is quite confusion prone

Expected behavior
We shouldn't have duplicated enums

Proposed solution
keep only coin_selection::Error's member

@e1a0a0ea e1a0a0ea added the bug Something isn't working label May 13, 2024
@notmandatory notmandatory added this to the 1.0.0-alpha milestone May 13, 2024
@matthiasdebernardini
Copy link

I ran into an issue while working on our wallet integration that I think is related to this thread.

When I try to create a PSBT on testnet or signet, I keep getting this error:

Error: Insufficient funds: 0 sat available of 11 sat needed

I understand why this check is important on mainnet (to more easily catch and handle low balance situations). But when I'm just trying to test stuff out on other networks, it just gets in the way.

What do you think about disabling this specific error for any network besides Network::Bitcoin? That way, we could generate PSBTs and test wallet compatibility more easily on testnets without this error getting in the way all the time. Maybe we could log a warning or print a message about the low balance instead?

Let me know your thoughts! I'm happy to submit a PR if you think this change would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants