diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 447e17dcb9..25893c1156 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4996,11 +4996,18 @@ UniValue initpegoutwallet(const JSONRPCRequest& request) } // Three acceptable descriptors: + bool is_liquid = Params().NetworkIDString() == "liquidv1"; if (bitcoin_desc.substr(0, 8) == "sh(wpkh(" && bitcoin_desc.substr(bitcoin_desc.size()-2, 2) == "))") { + if(is_liquid) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh() or ."); + } xpub_str = bitcoin_desc.substr(8, bitcoin_desc.size()-2); } else if (bitcoin_desc.substr(0, 5) == "wpkh(" && bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") { + if(is_liquid) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh() or ."); + } xpub_str = bitcoin_desc.substr(5, bitcoin_desc.size()-1); } else if (bitcoin_desc.substr(0, 4) == "pkh(" && bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") {