Skip to content

Commit

Permalink
qt: Disable 'Make Blank Wallet' option in Particl mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
tecnovert committed Mar 11, 2024
1 parent a080ab2 commit 959c64b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/qt/createwalletdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :

if (fParticlMode) {
ui->blank_wallet_checkbox->setChecked(true);
//ui->descriptor_checkbox->setChecked(false);
//ui->descriptor_checkbox->setEnabled(false);
ui->blank_wallet_checkbox->setEnabled(false);
}

connect(ui->wallet_name_line_edit, &QLineEdit::textEdited, [this](const QString& text) {
Expand Down Expand Up @@ -56,6 +55,7 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :

connect(ui->external_signer_checkbox, &QCheckBox::toggled, [this](bool checked) {
ui->encrypt_wallet_checkbox->setEnabled(!checked);
if (!fParticlMode)
ui->blank_wallet_checkbox->setEnabled(!checked);
ui->disable_privkeys_checkbox->setEnabled(!checked);

Expand All @@ -64,6 +64,7 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
// options to their default.
ui->encrypt_wallet_checkbox->setChecked(false);
ui->disable_privkeys_checkbox->setChecked(checked);
if (!fParticlMode)
ui->blank_wallet_checkbox->setChecked(false);
});

Expand All @@ -73,9 +74,11 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
ui->encrypt_wallet_checkbox->setEnabled(!checked);

// Wallets without private keys cannot set blank
ui->blank_wallet_checkbox->setEnabled(!checked);
if (checked) {
ui->blank_wallet_checkbox->setChecked(false);
if (!fParticlMode) {
ui->blank_wallet_checkbox->setEnabled(!checked);
if (checked) {
ui->blank_wallet_checkbox->setChecked(false);
}
}

// When the encrypt_wallet_checkbox is disabled, uncheck it.
Expand Down

0 comments on commit 959c64b

Please sign in to comment.