Skip to content

Commit 0c14b28

Browse files
authored
Update createtoken RPC to allow Gov to create DATs (#3073)
1 parent a80b805 commit 0c14b28

2 files changed

Lines changed: 230 additions & 59 deletions

File tree

src/dfi/rpc_tokens.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,9 @@ UniValue createtoken(const JSONRPCRequest &request) {
142142
auto [view, accountView, vaultView] = GetSnapshots();
143143
CTransactionRef optAuthTx;
144144
std::set<CScript> auths;
145-
rawTx.vin = GetAuthInputsSmart(pwallet,
146-
rawTx.nVersion,
147-
auths,
148-
metaObj["isDAT"].getBool(),
149-
optAuthTx,
150-
txInputs,
151-
*view,
152-
request.metadata.coinSelectOpts);
145+
const auto isDAT = metaObj["isDAT"].getBool();
146+
rawTx.vin = GetAuthInputsSmart(
147+
pwallet, rawTx.nVersion, auths, isDAT, optAuthTx, txInputs, *view, request.metadata.coinSelectOpts, isDAT);
153148

154149
rawTx.vout.push_back(CTxOut(GetTokenCreationFee(targetHeight), scriptMeta));
155150
rawTx.vout.push_back(CTxOut(GetTokenCollateralAmount(), GetScriptForDestination(collateralDest)));

0 commit comments

Comments
 (0)