Skip to content

Commit

Permalink
Merge c297714 into merged_master (Elements PR #625)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Nov 6, 2020
2 parents e5f9a5f + c297714 commit 68a81ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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=<custom chain name>`");
}

CAmount nAmount = AmountFromValue(request.params[0]);
CAmount nTokens = AmountFromValue(request.params[1]);
if (nAmount == 0 && nTokens == 0) {
Expand Down Expand Up @@ -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=<custom chain name>`");
}

std::string assetstr = request.params[0].get_str();
CAsset asset = GetAssetFromString(assetstr);

Expand Down

0 comments on commit 68a81ca

Please sign in to comment.