From 680d58d67f00508240a67a4f1608f507a5a80db3 Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:36:27 +0200 Subject: [PATCH 1/6] Update wallet.cpp --- src/wallet/wallet.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index cbf78a68c6..4ab5c6a3b6 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -342,11 +342,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; } From 0940a5414d806431ceadbc63bfc8a60d9539361e Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:37:21 +0200 Subject: [PATCH 2/6] Update createwalletdialog.ui --- src/qt/forms/createwalletdialog.ui | 13 ------------- 1 file changed, 13 deletions(-) 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 - - - From 9db2d62316825470438c30503bc8901d110ab3e8 Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:38:54 +0200 Subject: [PATCH 3/6] Update walletcontroller.cpp --- src/qt/walletcontroller.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } From d9b3123562ebcf38b508de980ee01bcd0b3f558e Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:43:12 +0200 Subject: [PATCH 4/6] Update createwalletdialog.cpp --- src/qt/createwalletdialog.cpp | 7 ------- 1 file changed, 7 deletions(-) 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(); From 4a40c157e15cef6edc14296f77eb73e7bfc52f1a Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 22:04:54 +0200 Subject: [PATCH 5/6] Update wallet.cpp --- src/wallet/wallet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 4ab5c6a3b6..732664268a 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(_("Wallet loaded successfully. The legacy wallet type is being deprecated and support for opening legacy wallets will be removed in the future.")); + } + AddWallet(wallet); wallet->postInitProcess(); From 6ba42bd68aec745ea1697bd8fab04f3676ded6b0 Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Wed, 3 Apr 2024 22:08:33 +0200 Subject: [PATCH 6/6] Update wallet.cpp --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 732664268a..07fd6c387c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -223,7 +223,7 @@ std::shared_ptr LoadWalletInternal(interfaces::Chain& chain, const std: // Legacy wallets are being deprecated, warn if the loaded wallet is legacy if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - warnings.push_back(_("Wallet loaded successfully. The legacy wallet type is being deprecated and support for opening legacy wallets will be removed in the future.")); + warnings.push_back(_("The legacy wallet type is being deprecated and support for opening legacy wallets will be removed in the future.")); } AddWallet(wallet);