-
Notifications
You must be signed in to change notification settings - Fork 714
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
[Wallet][RPC] Add subtract-fee-from-amount option in Create[Fund]Transaction #2341
[Wallet][RPC] Add subtract-fee-from-amount option in Create[Fund]Transaction #2341
Conversation
aec4e68
to
7116630
Compare
7116630
to
d0adf43
Compare
Rebased on master. |
40b5547
to
8fc6138
Compare
83a015c
to
1ae2364
Compare
Rebased on master, conflicts fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review till d1cde6f.
1ae2364
to
078c13d
Compare
>>> adapts bitcoin/bitcoin@292623a + bitcoin/bitcoin@6171826 Adds the autom-subtract-the-fee-from-the-amount-and-send-whats-left feature to the RPC (sendtoaddress and fundrawtransaction only for now).
and fix fIncludeDelegated (5-th parameter, index 4)
…e creating CRecipientBase class.
078c13d
to
a1bd590
Compare
Rebased on master, fixing conflicts, and added @furszy's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebase + cherry-pick utACK a1bd590.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a1bd590
3e860c5 [GUI] Display actual recipient amount with sffa in confirmation dlg (random-zebra) 3f45e09 GUI: Add styling for subtract fee from amount checkbox for light and dark themes. (furszy) 26ac915 [GUI] Add checkable btn in the contextual menu, for sffa with multirows (random-zebra) c8e74e0 [GUI] Add checkboxSubtractFeeFromAmount checkbox in sendmultirow (random-zebra) 04e43f9 [CSS] Prepare styling for btn-list-menu::checked (font-size/color) (random-zebra) Pull request description: Follow up to #2341. As per title, add controls for this feature in the graphical interface. For the moment, it's a simple checkbox, which is visible in case of single recipient. The confirmation dialog shows the difference in the "total amount" (paid) when the fee is subtracted, or not, from the recipient amount (in the example, sending `1.00 PIV`). <div> <img src="https://user-images.githubusercontent.com/18186894/116305097-99fdff80-a7a3-11eb-83a7-35d3d25b8881.png" width="700px"/> <img src="https://user-images.githubusercontent.com/18186894/116305490-23adcd00-a7a4-11eb-92dc-4b5a68089653.png" width="700px"/> </div> --- When there are multiple recipients, the checkbox is hidden, and controlled by a checkable button inside the contextual menu. <div> <img src="https://user-images.githubusercontent.com/18186894/116305579-44762280-a7a4-11eb-84dc-30ac3a7f29ce.png" width="600px" margin="center"/> </div> Maybe this is not very intuitive, or pretty, but it does the job. Later on, possibly with the help of @Neoperol, we can design a better placement for these controls. Closes #894 Closes #2196 Obviously based on top of - [x] #2341 which must be reviewed before this one. ACKs for top commit: furszy: Tested ACK 3e860c5. Fuzzbawls: ACK 3e860c5 Tree-SHA512: 651045d9fd655b7108682bd5478f2ae2cd5f6c61a725e952d6705a9df0809fab0c1b99152340d829262e7133c3228db0e1fb9abdcc1671dc5d7898f9ff485038
Add a feature requested many times (#894, #1079, #2196, ...)
Allow the user to deduct the fee from one or more of the transaction recipient amounts.
The most common use-case is when sending the whole balance, or a selection of UTXOs, without getting any change back.
This is already possible by selecting "after-fee-amount" in coin-control, but such metod is not user-friendly (e.g. in case of shield recipients, to get the correct value, the destinations must already be filled before opening coin-control and copying the "after-fee" value).
Plus, this workaround is only available in the GUI.
The subtract-fee option makes it easier, and enables it via the cli as well.
Here it's exposed only to the RPC, both for transparent and shield recipients:
sendtoaddress
sendmany
shieldsendmany
fundrawtransaction
GUI connection will be added in a successive PR (which will close those issues).
Last commit is coming from bitcoin#10294(in #2351)Built on top of: