mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Disallow issuance calls in bitcoin mode
This commit is contained in:
parent
d91380384d
commit
5de1e3f9d5
1 changed files with 8 additions and 0 deletions
|
|
@ -5850,6 +5850,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) {
|
||||
|
|
@ -5938,6 +5942,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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue