-
Notifications
You must be signed in to change notification settings - Fork 725
[GUI] Double confirmation dialog for dumpwallet command. #1928
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
[GUI] Double confirmation dialog for dumpwallet command. #1928
Conversation
fa1326f to
34b0531
Compare
|
I'm very happy to see this PR, which puts PIVX at the top of the list for caring about less skilled community members. I've tested this PR, wallet will open a confirmation dialog only when the exact Same thing is with the So I guess the condition for the confirmation dialog triggering should be if the typed command consist the |
random-zebra
left a comment
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.
It would be better to pop-up the dialog only when the command is entered correctly.
E.g. if you type only dumpwallet, without specifying the filename, the dialog shouldn't be presented, and the console should directly print the help.
But this would require much more invasive changes, and it's a really minor issue (that can be addressed later, if needed).
So ACK 34b0531 from my side.
| void clear(bool clearHistory = true); | ||
| void message(int category, const QString &msg) { message(category, msg, false); } | ||
| void message(int category, const QString &message, bool html); | ||
| void response(int category, const QString &message) { messageInternal(category, message); }; |
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.
non-blocking nit:
let's call this reply instead of response (for consistency with the RPCExecutor signal)
Fuzzbawls
left a comment
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 34b0531
…expose privkeys 81e4d15 [GUI][RPC] Add exportsaplingkey to the list of pot. dangerous cmds (random-zebra) 1d63d1a [GUI][BUG] Fix confirmation dialog for dumpwallet/dumpprivkey (random-zebra) Pull request description: Fix an issue with the double confirmation dialog introduced in #1928 Currently the confirmation pop-up is shown only when the RPC command string is exactly "dumpwallet"/"dumpprivkey" (with no arguments). Such command strings are not valid, as both RPC functions require one argument (the filename for "dumpwallet" and the PIVX address for "dumpprivkey"). So, when the user confirms the dialog, the RPC console returns an error (as the argument is missing), showing the RPC help. When, instead, the user enters the correct RPC strings (`dumpwallet <filename>`/`dumpprivkey <pivxaddress>`), then **the warning dialog is NOT presented** and the command is executed immediately. Fix it by doing a pre-validation for the potentially dangerous commands. Bonus: include `exportsaplingkey` to the list. Note: for `dumpprivkey`/`exportsaplingkey` this means a double parsing of the command string and decoding of the address argument (one during the pre-validation, and one during the actual execution of the RPC). But I think we can live with that for now. ACKs for top commit: Fuzzbawls: ACK 81e4d15 furszy: ACK 81e4d15 Tree-SHA512: 56c004a8771cc1a11b892272c28e68792f4414061dc37450e4e58e60c5e3570e0fd36f5b8bd00535647622ea018ef5947413c3ff67ef7baa3134ae757ea262d7
Another attempt to alert users about scams, added a second confirmation dialog after requesting a
dumpwalletordumpprivkeyin the internal GUI wallet console.Want to emphasize that this is a GUI only change, command line RPC call will continue exactly as before.
After typing

dumpwallet, the application will launch the following confirmation dialog:So, in other words, the command will only be executed if the user presses "OK" on this "DON'T DO THIS" warning