diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 7f2586b6e57..09c7b1acbeb 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5999,6 +5999,10 @@ UniValue issueasset(const JSONRPCRequest& request) auto locked_chain = pwallet->chain().lock(); LOCK(pwallet->cs_wallet); + if (!g_con_elementsmode) { + throw JSONRPCError(RPC_TYPE_ERROR, "Issuance can only be done on elements-style chains. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=`"); + } + CAmount nAmount = AmountFromValue(request.params[0]); CAmount nTokens = AmountFromValue(request.params[1]); if (nAmount == 0 && nTokens == 0) { @@ -6090,6 +6094,10 @@ UniValue reissueasset(const JSONRPCRequest& request) auto locked_chain = pwallet->chain().lock(); LOCK(pwallet->cs_wallet); + if (!g_con_elementsmode) { + throw JSONRPCError(RPC_TYPE_ERROR, "Issuance can only be done on elements-style chains. Note: `-regtest` is Bitcoin's regtest mode, instead try `-chain=`"); + } + std::string assetstr = request.params[0].get_str(); CAsset asset = GetAssetFromString(assetstr);