From 9c1cd0aae502af8d7ed07a6290f5db7625e7a4db Mon Sep 17 00:00:00 2001 From: Peter John Bushnell Date: Wed, 29 Jun 2022 12:02:28 +0100 Subject: [PATCH] Restore minttoken by owner for DATs (#1361) --- src/masternodes/rpc_tokens.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/masternodes/rpc_tokens.cpp b/src/masternodes/rpc_tokens.cpp index 3e12c39c6c..ec586a5608 100644 --- a/src/masternodes/rpc_tokens.cpp +++ b/src/masternodes/rpc_tokens.cpp @@ -688,10 +688,10 @@ UniValue minttokens(const JSONRPCRequest& request) { } if (token->IsDAT()) { needFoundersAuth = true; - } else { - const Coin& authCoin = ::ChainstateActive().CoinsTip().AccessCoin(COutPoint(token->creationTx, 1)); // always n=1 output - auths.insert(authCoin.out.scriptPubKey); } + // Get token owner auth if present + const Coin& authCoin = ::ChainstateActive().CoinsTip().AccessCoin(COutPoint(token->creationTx, 1)); // always n=1 output + auths.insert(authCoin.out.scriptPubKey); } } rawTx.vin = GetAuthInputsSmart(pwallet, rawTx.nVersion, auths, needFoundersAuth, optAuthTx, txInputs);