There is now only one opreturn possible in z_sendmany so pull the assignment to opret out of the loop
This commit is contained in:
@@ -5172,6 +5172,11 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
|
||||
bool containsSaplingOutput = false;
|
||||
|
||||
// Create the CScript representation of the OP_RETURN
|
||||
if (!opretValue.isNull()) {
|
||||
opret << OP_RETURN << ParseHex(opretValue.get_str().c_str());
|
||||
}
|
||||
|
||||
for (const UniValue& o : outputs.getValues()) {
|
||||
if (!o.isObject())
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected object");
|
||||
@@ -5198,11 +5203,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
// throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Extreme Privacy! You must send to a zaddr");
|
||||
//}
|
||||
|
||||
// Create the CScript representation of the OP_RETURN
|
||||
if (!opretValue.isNull()) {
|
||||
opret << OP_RETURN << ParseHex(opretValue.get_str().c_str());
|
||||
}
|
||||
|
||||
UniValue memoValue = find_value(o, "memo");
|
||||
string memo;
|
||||
if (!memoValue.isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user