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 @@ -1475,6 +1475,11 @@ static RPCHelpMan decodepsbt()
1475
1475
} else {
1476
1476
out.pushKV (" amountcommitment" , txout.nValue .GetHex ());
1477
1477
}
1478
+ if (txout.nAsset .IsExplicit ()) {
1479
+ out.pushKV (" asset" , txout.nAsset .GetAsset ().GetHex ());
1480
+ } else {
1481
+ out.pushKV (" assetcommitment" , txout.nAsset .GetHex ());
1482
+ }
1478
1483
out.pushKV (" scriptPubKey" , o);
1479
1484
1480
1485
in.pushKV (" witness_utxo" , out);
Original file line number Diff line number Diff line change @@ -257,6 +257,10 @@ def run_basic_tests(self, confidential):
257
257
decoded = self .nodes [1 ].decodepsbt (walletsignpsbt_out ['psbt' ])
258
258
assert 'non_witness_utxo' in decoded ['inputs' ][0 ]
259
259
assert 'witness_utxo' in decoded ['inputs' ][0 ]
260
+ if 'asset' in decoded ['inputs' ][0 ]['witness_utxo' ]:
261
+ assert_equal (decoded ['inputs' ][0 ]['witness_utxo' ]['asset' ], 'b2e15d0d7a0c94e4e2ce0fe6e8691b9e451377f6e46e8045a86f7c4b5d4f0f23' )
262
+ else :
263
+ assert 'assetcommitment' in decoded ['inputs' ][0 ]['witness_utxo' ]
260
264
# Check decodepsbt fee calculation (input values shall only be counted once per UTXO)
261
265
#assert_equal(decoded['fee'], created_psbt['fee']) # ELEMENTS: we do not have this field. Should be fixed by #900
262
266
assert_equal (walletsignpsbt_out ['complete' ], True )
You can’t perform that action at this time.
0 commit comments