-
Notifications
You must be signed in to change notification settings - Fork 312
Add SubFeeFromAmount to options #390
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
Conversation
1d52b5d
to
4dc9181
Compare
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.
tACK 4dc9181
Tested on Ubuntu 20.04
This PR is adding a feature in the wallet settings so that the GUI will remember the default behavior of whether to subtract the fee from the transaction or not. As said by op this setting will be remembered even when the GUI is closed and reopened. This is done by setting a bool value based on if the checkbox is selected in settings or not, and then using that bool value to determine the default state of the SubFeeFromAmount option.
The PR is doing what it describes in the description. It is also not modifying any part of the code, which it should be modifying.
Adding some screenshots to show the proper working of the PR. The PR was compiled and ran on the signet chain.
In my opinion, this PR is an improvement over the current master. For those who often use the “Subtract fee from amount” option, this feature can be quite handy.
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.
Concept ACK, please add translator comments
PR Updated from 4dc9181 -> 17d7b21 |
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.
Concept ACK
Existing recipients should respond to the 'SubFeeFromAmountChanged' signal.
There are scenarios where you have multiple recipients filled out. After you've filled them out, you now want all of them to 'Subtract fee from amount'. If we allow the existing recipients to respond to the 'SubFeeFromAmountChanged' signal, then you don't have to manually check every box. You can go into settings, set the option, come back and all of your recipients will not have the 'Subtract Fee from amount' box checked.
Similarly, if you already had the option set and created a bunch of recipients; you could unselect the option in settings and then all the boxes become unchecked.
I don't agree. The Options Dialog sets the default value of the "Subtract Fee..." setting. That means it is used only once per every recipient -- just initialize its own checkbox. In other words, it is not supposed to be a batch switcher.
I'm not sure if this scenario would be ever convenient for users. |
Approach ACK I rescind my comments here about the behavior of this option. The appropriate place for a batch switch would be in the Send tab itself. Please update the translator comments 🥃 |
Concept ACK. Why a new "subFeeFromAmount" checkbox is placed within the "Expert" group? Shouldn't it be an independent option? |
Agreed, It doesn't belong to an "expert" group. That's quite some observation there. Will make the required changes and add. |
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.
Approach ACK fb194c3, going to test and review more closely.
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.
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.
Almost there, one last thing: #390 (comment)
54ce509
to
ec25093
Compare
ec25093
to
7bf1a2b
Compare
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.
tACK 7bf1a2b tested on macOS 12 and Ubuntu 20.04. The setting works nicely and is a definite UX improvement. Nice job 🥃 |
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.
tACK 7bf1a2b
Tested on Ubuntu 20.04
Changes that OP made since my previous review:
- Formatting is fixed according to clang-format.
- Moved case SubFeeAmount under #ifdef ENABLE_WALLET to prevent this feature from working when wallet functionality is disabled.
- The AddSubFeeAmount options have been moved out of the Expert menu.
- Indentations in optionsdialog.ui have been fixed not to create unnecessary indentation changes when the file is opened in QTDesigner.
Just want to add one small thing; you should modify the video describing the PR, as it is still showing the option under the Expert menu :)
7bf1a2b
to
62b125f
Compare
PR Updated from 7bf1a2b -> 62b125f. Click here to check diff. Addressed changes suggested by @meshcollider. |
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.
tACK 62b125f, tested on Debian Sid with 5.15.2 and it works as described. |
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.
utACK 62b125f
A big thanks to all the contributors who took out time to test and review my PR. |
This PR adds SubFeeFromAmount option which lets the user select their preferred setting of whether fee for a transaction is to be subtracted from the amount or not for future transactions. The setting chosen by the user is remembered even when the GUI mode is turned off.
Functionality and Usage:
Settings > Options > Wallet
on Windows/Linux orbitcoin-qt > Preferences > Wallet
on macOS.(Try clicking on Add recipient or even restarting the Node in GUI)
Attaching ScreenRecordings to explain the added feature.
Master.mov
PR.mov
Close #386