diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index c2a11e66c7c..f7d37239c6c 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -356,11 +356,6 @@ RPCHelpMan importdescriptors() // the user could have gotten from another RPC command prior to now wallet.BlockUntilSyncedToCurrentChain(); - // Make sure wallet is a descriptor wallet - if (!pwallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - throw JSONRPCError(RPC_WALLET_ERROR, "importdescriptors is not available for non-descriptor wallets"); - } - WalletRescanReserver reserver(*pwallet); if (!reserver.reserve(/*with_passphrase=*/true)) { throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait."); @@ -493,10 +488,6 @@ RPCHelpMan listdescriptors() const std::shared_ptr wallet = GetWalletForJSONRPCRequest(request); if (!wallet) return UniValue::VNULL; - if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - throw JSONRPCError(RPC_WALLET_ERROR, "listdescriptors is not available for non-descriptor wallets"); - } - const bool priv = !request.params[0].isNull() && request.params[0].get_bool(); if (priv) { EnsureWalletIsUnlocked(*wallet); diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp index 4bd4851609d..d1bf4105aa6 100644 --- a/src/wallet/rpc/wallet.cpp +++ b/src/wallet/rpc/wallet.cpp @@ -763,10 +763,6 @@ RPCHelpMan gethdkeys() const std::shared_ptr wallet = GetWalletForJSONRPCRequest(request); if (!wallet) return UniValue::VNULL; - if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - throw JSONRPCError(RPC_WALLET_ERROR, "gethdkeys is not available for non-descriptor wallets"); - } - LOCK(wallet->cs_wallet); UniValue options{request.params[0].isNull() ? UniValue::VOBJ : request.params[0]}; @@ -865,11 +861,6 @@ static RPCHelpMan createwalletdescriptor() std::shared_ptr const pwallet = GetWalletForJSONRPCRequest(request); if (!pwallet) return UniValue::VNULL; - // Make sure wallet is a descriptor wallet - if (!pwallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - throw JSONRPCError(RPC_WALLET_ERROR, "createwalletdescriptor is not available for non-descriptor wallets"); - } - std::optional output_type = ParseOutputType(request.params[0].get_str()); if (!output_type) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Unknown address type '%s'", request.params[0].get_str()));