File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1104,6 +1104,7 @@ UniValue decodepsbt(const JSONRPCRequest& request)
1104
1104
const PSBTInput& input = psbtx.inputs [i];
1105
1105
UniValue in (UniValue::VOBJ);
1106
1106
// UTXOs
1107
+ bool have_a_utxo = false ;
1107
1108
if (!input.witness_utxo .IsNull ()) {
1108
1109
const CTxOut& txout = input.witness_utxo ;
1109
1110
@@ -1121,7 +1122,9 @@ UniValue decodepsbt(const JSONRPCRequest& request)
1121
1122
ScriptToUniv (txout.scriptPubKey , o, true );
1122
1123
out.pushKV (" scriptPubKey" , o);
1123
1124
in.pushKV (" witness_utxo" , out);
1124
- } else if (input.non_witness_utxo ) {
1125
+ have_a_utxo = true ;
1126
+ }
1127
+ if (input.non_witness_utxo ) {
1125
1128
UniValue non_wit (UniValue::VOBJ);
1126
1129
TxToUniv (*input.non_witness_utxo , uint256 (), non_wit, false );
1127
1130
in.pushKV (" non_witness_utxo" , non_wit);
@@ -1132,7 +1135,9 @@ UniValue decodepsbt(const JSONRPCRequest& request)
1132
1135
// Hack to just not show fee later
1133
1136
have_all_utxos = false ;
1134
1137
}
1135
- } else {
1138
+ have_a_utxo = true ;
1139
+ }
1140
+ if (!have_a_utxo) {
1136
1141
have_all_utxos = false ;
1137
1142
}
1138
1143
You can’t perform that action at this time.
0 commit comments