diff --git a/src/qt/createwalletdialog.cpp b/src/qt/createwalletdialog.cpp
index 43b7548263..786fde394f 100644
--- a/src/qt/createwalletdialog.cpp
+++ b/src/qt/createwalletdialog.cpp
@@ -50,12 +50,10 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
ui->encrypt_wallet_checkbox->setEnabled(!checked);
ui->blank_wallet_checkbox->setEnabled(!checked);
ui->disable_privkeys_checkbox->setEnabled(!checked);
- ui->descriptor_checkbox->setEnabled(!checked);
// The external signer checkbox is only enabled when a device is detected.
// In that case it is checked by default. Toggling it restores the other
// options to their default.
- ui->descriptor_checkbox->setChecked(checked);
ui->encrypt_wallet_checkbox->setChecked(false);
ui->disable_privkeys_checkbox->setChecked(checked);
// The blank check box is ambiguous. This flag is always true for a
@@ -153,11 +151,6 @@ bool CreateWalletDialog::isMakeBlankWalletChecked() const
return ui->blank_wallet_checkbox->isChecked();
}
-bool CreateWalletDialog::isDescriptorWalletChecked() const
-{
- return ui->descriptor_checkbox->isChecked();
-}
-
bool CreateWalletDialog::isExternalSignerChecked() const
{
return ui->external_signer_checkbox->isChecked();
diff --git a/src/qt/forms/createwalletdialog.ui b/src/qt/forms/createwalletdialog.ui
index 56adbe17a5..e32c437fb8 100644
--- a/src/qt/forms/createwalletdialog.ui
+++ b/src/qt/forms/createwalletdialog.ui
@@ -99,19 +99,6 @@
- -
-
-
- Use descriptors for scriptPubKey management
-
-
- Descriptor Wallet
-
-
- true
-
-
-
-
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp
index 9902a6e312..cdb1a44aa9 100644
--- a/src/qt/walletcontroller.cpp
+++ b/src/qt/walletcontroller.cpp
@@ -255,15 +255,13 @@ void CreateWalletActivity::createWallet()
std::string name = m_create_wallet_dialog->walletName().toStdString();
uint64_t flags = 0;
+ flags |= WALLET_FLAG_DESCRIPTORS;
if (m_create_wallet_dialog->isDisablePrivateKeysChecked()) {
flags |= WALLET_FLAG_DISABLE_PRIVATE_KEYS;
}
if (m_create_wallet_dialog->isMakeBlankWalletChecked()) {
flags |= WALLET_FLAG_BLANK_WALLET;
}
- if (m_create_wallet_dialog->isDescriptorWalletChecked()) {
- flags |= WALLET_FLAG_DESCRIPTORS;
- }
if (m_create_wallet_dialog->isExternalSignerChecked()) {
flags |= WALLET_FLAG_EXTERNAL_SIGNER;
}
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index cbf78a68c6..07fd6c387c 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -220,6 +220,12 @@ std::shared_ptr LoadWalletInternal(interfaces::Chain& chain, const std:
status = DatabaseStatus::FAILED_LOAD;
return nullptr;
}
+
+ // Legacy wallets are being deprecated, warn if the loaded wallet is legacy
+ if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
+ warnings.push_back(_("The legacy wallet type is being deprecated and support for opening legacy wallets will be removed in the future."));
+ }
+
AddWallet(wallet);
wallet->postInitProcess();
@@ -342,11 +348,6 @@ std::shared_ptr CreateWallet(interfaces::Chain& chain, const std::strin
// Write the wallet settings
UpdateWalletSetting(chain, name, load_on_start, warnings);
- // Legacy wallets are being deprecated, warn if a newly created wallet is legacy
- if (!(wallet_creation_flags & WALLET_FLAG_DESCRIPTORS)) {
- warnings.push_back(_("Wallet created successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future."));
- }
-
status = DatabaseStatus::SUCCESS;
return wallet;
}