@@ -247,12 +247,12 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
247
247
const auto & txouts = outputs.empty () ? wtx.tx ->vout : outputs;
248
248
for (size_t i = 0 ; i < txouts.size (); ++i) {
249
249
const CTxOut& output = txouts.at (i);
250
+ CTxDestination dest;
251
+ ExtractDestination (output.scriptPubKey , dest);
250
252
if (reduce_output.has_value () ? reduce_output.value () == i : OutputIsChange (wallet, output)) {
251
- CTxDestination change_dest;
252
- ExtractDestination (output.scriptPubKey , change_dest);
253
- new_coin_control.destChange = change_dest;
253
+ new_coin_control.destChange = dest;
254
254
} else {
255
- CRecipient recipient = {output. scriptPubKey , output.nValue , false };
255
+ CRecipient recipient = {dest , output.nValue , false };
256
256
recipients.push_back (recipient);
257
257
}
258
258
new_outputs_value += output.nValue ;
@@ -268,7 +268,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
268
268
269
269
// Add change as recipient with SFFO flag enabled, so fees are deduced from it.
270
270
// If the output differs from the original tx output (because the user customized it) a new change output will be created.
271
- recipients.emplace_back (CRecipient{GetScriptForDestination ( new_coin_control.destChange ) , new_outputs_value, /* fSubtractFeeFromAmount=*/ true });
271
+ recipients.emplace_back (CRecipient{new_coin_control.destChange , new_outputs_value, /* fSubtractFeeFromAmount=*/ true });
272
272
new_coin_control.destChange = CNoDestination ();
273
273
}
274
274
0 commit comments