File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,11 @@ static RPCHelpMan decodepsbt()
1120
1120
} else {
1121
1121
out.pushKV (" amountcommitment" , txout.nValue .GetHex ());
1122
1122
}
1123
+ if (txout.nAsset .IsExplicit ()) {
1124
+ out.pushKV (" asset" , txout.nAsset .GetAsset ().GetHex ());
1125
+ } else {
1126
+ out.pushKV (" assetcommitment" , txout.nAsset .GetHex ());
1127
+ }
1123
1128
out.pushKV (" scriptPubKey" , o);
1124
1129
1125
1130
in.pushKV (" witness_utxo" , out);
Original file line number Diff line number Diff line change @@ -278,6 +278,10 @@ def run_basic_tests(self, confidential):
278
278
decoded = self .nodes [1 ].decodepsbt (walletsignpsbt_out ['psbt' ])
279
279
assert 'non_witness_utxo' in decoded ['inputs' ][0 ]
280
280
assert 'witness_utxo' in decoded ['inputs' ][0 ]
281
+ if 'asset' in decoded ['inputs' ][0 ]['witness_utxo' ]:
282
+ assert_equal (decoded ['inputs' ][0 ]['witness_utxo' ]['asset' ], 'b2e15d0d7a0c94e4e2ce0fe6e8691b9e451377f6e46e8045a86f7c4b5d4f0f23' )
283
+ else :
284
+ assert 'assetcommitment' in decoded ['inputs' ][0 ]['witness_utxo' ]
281
285
# Check decodepsbt fee calculation (input values shall only be counted once per UTXO)
282
286
#assert_equal(decoded['fee'], created_psbt['fee']) # ELEMENTS: we do not have this field. Should be fixed by #900
283
287
assert_equal (walletsignpsbt_out ['complete' ], True )
You can’t perform that action at this time.
0 commit comments