[Wallet][RPC] Add subtract-fee-from-amount option in Create[Fund]Transaction#2341
Merged
furszy merged 10 commits intoPIVX-Project:masterfrom Jun 13, 2021
Merged
Conversation
1 task
aec4e68 to
7116630
Compare
7116630 to
d0adf43
Compare
Author
|
Rebased on master. |
40b5547 to
8fc6138
Compare
83a015c to
1ae2364
Compare
Author
|
Rebased on master, conflicts fixed. |
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
Author
|
Rebased on master, fixing conflicts, and added @furszy's |
furszy
approved these changes
Jun 9, 2021
Fuzzbawls
approved these changes
Jun 13, 2021
random-zebra
added a commit
that referenced
this pull request
Jul 18, 2021
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
sendtoaddresssendmanyshieldsendmanyfundrawtransactionGUI 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: