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()
14751475 } else {
14761476 out.pushKV (" amountcommitment" , txout.nValue .GetHex ());
14771477 }
1478+ if (txout.nAsset .IsExplicit ()) {
1479+ out.pushKV (" asset" , txout.nAsset .GetAsset ().GetHex ());
1480+ } else {
1481+ out.pushKV (" assetcommitment" , txout.nAsset .GetHex ());
1482+ }
14781483 out.pushKV (" scriptPubKey" , o);
14791484
14801485 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):
257257 decoded = self .nodes [1 ].decodepsbt (walletsignpsbt_out ['psbt' ])
258258 assert 'non_witness_utxo' in decoded ['inputs' ][0 ]
259259 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' ]
260264 # Check decodepsbt fee calculation (input values shall only be counted once per UTXO)
261265 #assert_equal(decoded['fee'], created_psbt['fee']) # ELEMENTS: we do not have this field. Should be fixed by #900
262266 assert_equal (walletsignpsbt_out ['complete' ], True )
You can’t perform that action at this time.
0 commit comments