-
Notifications
You must be signed in to change notification settings - Fork 289
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
qt: remove unused 'Decrypt' wallet #42
Conversation
Concept ACK. |
Concept tACK f9d41da minor nit how about this? index 26aa38320..2ba74082f 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -262,9 +262,11 @@ void WalletView::encryptWallet(bool status)
{
if(!walletModel)
return;
- AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Encrypt, this);
- dlg.setModel(walletModel);
- dlg.exec();
+ if (walletModel->getEncryptionStatus() == WalletModel::Unencrypted) {
+ AskPassphraseDialog dlg(AskPassphraseDialog::Encrypt, this);
+ dlg.setModel(walletModel);
+ dlg.exec();
+ }
updateEncryptionStatus();
}
|
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.
As a general rule each commit must compile and pass tests. Therefore, please squash all commits into a single one.
Mind refactoring enum Mode
into enum class Mode
? (this suggestion could be leaved for an followup though)
Since the encryptWalletAction
is enabled only after encryptWalletAction->setChecked(false)
(see: BitcoinGUI::setEncryptionStatus()
), may I suggest to explicitly ignore the bool parameter (or, better, assert(!status)
) in WalletFrame::encryptWallet()
, and make WalletView::encryptWallet()
parameterless?
Condition |
@hebasto tyi , not what I observed, when testing, maybe a minor bug?
The flag is an int and give us the info we need here. The bool does sometimes not correctly reflect all three states. Maybe @sehyunc like to find out as an exercise? Did not dig deeper. tyi |
Mind providing steps to reproduce it?
The bool is just a value of |
@hebasto sure if iirc, compile i.e. with the PR or just
then create multiple wallets load all encrypt all, close all and then load them randomly and then try click encrypt. You probably will find by that even the next bug not mentioned yet, hoops you asked, I like that ping pong push things forward. |
@hebasto So you as somewhat main gui dev should maybe switch to common used platforms ubuntu/lubuntu/debian/mac with there default qt dev libs or could be we have here a hardware dependent racing condition? Or maybe I have the most exotic combination and the AI that simulates me is not efficient or fast enough to guess how it must simulate the desktop my virtual eye's will see? |
Concept ACK As noted by others, the commit order should be reversed or all the commits squashed so that each commit individually compiles. |
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
Fellow reviewers! Please review #109. |
4146a31 qt, wallet: Drop unused parameter in WalletModel::setWalletEncrypted (Hennadii Stepanov) f886a20 qt, wallet: Drop unused parameter in Wallet{Frame|View}::encryptWallet (Hennadii Stepanov) 6e95011 qt, wallet: Remove unused AskPassphraseDialog::Decrypt (Hennadii Stepanov) Pull request description: Grabbed from #42 with an additional commit. Fix #1. ACKs for top commit: MarcoFalke: ACK 4146a31 promag: Code review ACK 4146a31. Tree-SHA512: 6070d8995525af826ad972cf1b8988ff98af0528eef285a07ec7ba0e2e92a7a6173a19dc371de94d4b437fa10f7921166e45a081de6ed2f4306e6502aafc94ee
b5ef9be675 Merge #1: Merge changes from upstream 9e7f512430 Merge remote-tracking branch 'origin/master' into bitcoin-fork 1f85030246 Add support for ARM64 darwin (#43) 3bb959c982 Remove unnecessary reinterpret_cast (#42) 2e97ab26b1 Fix (unused) ReadUint64LE for BE machines (#41) 47b40d2209 Bump dependencies. (#40) ba74185625 Move CI to Visual Studio 2019. efa301a7e5 Allow different C/C++ standards when this is used as a subproject. cc6d71465e CMake: Use configure_package_config_file() git-subtree-dir: src/crc32c git-subtree-split: b5ef9be6755a2e61e2988bb238f13d1c0ee1fa0a
@MarcoFalke @hebasto can the |
Fix #1
remove 'Decrypt' case from enum in AskPassPhraseDialog
remove 'Decrypt' case from switch statements
show only Encrypt option in dialog
would appreciate feedback, specifically on src/qt/walletview.cpp:265