diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 1781909eb6..8219dc992e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5977,6 +5977,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) { @@ -6068,6 +6072,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);