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 @@ -1116,6 +1116,7 @@ UniValue decodepsbt(const JSONRPCRequest& request)
11161116 const PSBTInput& input = psbtx.inputs [i];
11171117 UniValue in (UniValue::VOBJ);
11181118 // UTXOs
1119+ bool have_a_utxo = false ;
11191120 if (!input.witness_utxo .IsNull ()) {
11201121 const CTxOut& txout = input.witness_utxo ;
11211122
@@ -1133,7 +1134,9 @@ UniValue decodepsbt(const JSONRPCRequest& request)
11331134 ScriptToUniv (txout.scriptPubKey , o, true );
11341135 out.pushKV (" scriptPubKey" , o);
11351136 in.pushKV (" witness_utxo" , out);
1136- } else if (input.non_witness_utxo ) {
1137+ have_a_utxo = true ;
1138+ }
1139+ if (input.non_witness_utxo ) {
11371140 UniValue non_wit (UniValue::VOBJ);
11381141 TxToUniv (*input.non_witness_utxo , uint256 (), non_wit, false );
11391142 in.pushKV (" non_witness_utxo" , non_wit);
@@ -1144,7 +1147,9 @@ UniValue decodepsbt(const JSONRPCRequest& request)
11441147 // Hack to just not show fee later
11451148 have_all_utxos = false ;
11461149 }
1147- } else {
1150+ have_a_utxo = true ;
1151+ }
1152+ if (!have_a_utxo) {
11481153 have_all_utxos = false ;
11491154 }
11501155
You can’t perform that action at this time.
0 commit comments