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

feat: drain on-chain wallet #1541

Merged
merged 2 commits into from
Nov 1, 2023
Merged

feat: drain on-chain wallet #1541

merged 2 commits into from
Nov 1, 2023

Conversation

bonomat
Copy link
Contributor

@bonomat bonomat commented Oct 29, 2023

Resolves #1538

@bonomat bonomat requested review from holzeis and luckysori October 29, 2023 09:54
@bonomat bonomat changed the title chore: make clippy happy feat: drain on-chain wallet Oct 29, 2023
Copy link
Contributor

@holzeis holzeis left a comment

Choose a reason for hiding this comment

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

I guess it works, although I am not a fan of misusing the amount input field for that.

Maybe a drain button, that fetches the max amount that can be spent and sets it into the amount field would be better?

@bonomat
Copy link
Contributor Author

bonomat commented Oct 29, 2023

I guess it works, although I am not a fan of misusing the amount input field for that.

Imho that's a defacto standard in Bitcoin wallets.

Maybe a drain button, that fetches the max amount that can be spent and sets it into the amount field would be better?

This is very hard to calculate in advance, you'd need to use the drain function first, then create the transaction, and then get the output's amount and return it back to the UI.

@bonomat bonomat added this pull request to the merge queue Oct 29, 2023
@holzeis holzeis removed this pull request from the merge queue due to a manual request Oct 29, 2023
Copy link
Contributor

@holzeis holzeis left a comment

Choose a reason for hiding this comment

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

@bonomat I forgot that this screen is also used for sending lightning. I think your changes will not work in that case.

mobile/lib/features/wallet/send/send_screen.dart Outdated Show resolved Hide resolved
@bonomat bonomat enabled auto-merge October 31, 2023 21:19
@holzeis holzeis self-requested a review November 1, 2023 07:19
@bonomat bonomat added this pull request to the merge queue Nov 1, 2023
@holzeis holzeis removed this pull request from the merge queue due to a manual request Nov 1, 2023
@bonomat bonomat added this pull request to the merge queue Nov 1, 2023
Merged via the queue into main with commit 0c0a33a Nov 1, 2023
8 checks passed
@bonomat bonomat deleted the feat/send-all branch November 1, 2023 07:44
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.

Add max amount button to send out on-chain funds
2 participants