diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index cbbac4dca..e313a7743 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3988,6 +3988,13 @@ UniValue sethdseed(const JSONRPCRequest& request) return NullUniValue; } + if (sigdata.witness) { + // Convert the non-witness utxo to witness + if (input.witness_utxo.IsNull() && input.non_witness_utxo) { + input.witness_utxo = input.non_witness_utxo->vout[txin.prevout.n]; + } + } + UniValue walletprocesspsbt(const JSONRPCRequest& request) { std::shared_ptr const wallet = GetWalletForJSONRPCRequest(request);