@@ -619,7 +619,7 @@ class Client {
619
619
}
620
620
}
621
621
622
- private selectUTXOs ( utxos : UtxoEntry [ ] , amount : bigint , outputType : string , token_id : string | null ) : UtxoInput [ ] {
622
+ private selectUTXOs ( utxos : UtxoEntry [ ] , amount : bigint , token_id : string | null ) : UtxoInput [ ] {
623
623
return this . selectUTXOsForTransfer ( utxos , amount , token_id ) ;
624
624
}
625
625
@@ -714,11 +714,15 @@ class Client {
714
714
} )
715
715
. filter ( ( utxo ) => transferableUtxoTypes . includes ( utxo . utxo . type ) )
716
716
. filter ( ( utxo ) => {
717
- if ( token_id === null ) {
718
- return utxo . utxo . value . type === 'Coin' ;
719
- }
720
- if ( utxo . utxo . value . type === 'TokenV1' ) {
721
- return utxo . utxo . value . token_id === token_id ;
717
+ if ( utxo . utxo . type === 'IssueNft' ) {
718
+ return utxo . utxo . token_id === token_id ;
719
+ } else {
720
+ if ( token_id === null ) {
721
+ return utxo . utxo . value . type === 'Coin' ;
722
+ }
723
+ if ( utxo . utxo . value . type === 'TokenV1' ) {
724
+ return utxo . utxo . value . token_id === token_id ;
725
+ }
722
726
}
723
727
} ) ;
724
728
@@ -1551,9 +1555,9 @@ class Client {
1551
1555
fee += BigInt ( 2 * Math . pow ( 10 , 11 ) ) ;
1552
1556
input_amount_coin_req += fee ;
1553
1557
1554
- const inputObjCoin = this . selectUTXOs ( utxos , input_amount_coin_req , 'Transfer' , null ) ;
1558
+ const inputObjCoin = this . selectUTXOs ( utxos , input_amount_coin_req , null ) ;
1555
1559
const inputObjToken = send_token ?. token_id
1556
- ? this . selectUTXOs ( utxos , input_amount_token_req , 'Transfer' , send_token . token_id )
1560
+ ? this . selectUTXOs ( utxos , input_amount_token_req , send_token . token_id )
1557
1561
: [ ] ;
1558
1562
1559
1563
const totalInputValueCoin = inputObjCoin . reduce ( ( acc , item ) => acc + BigInt ( item . utxo ! . value . amount . atoms ) , 0n ) ;
0 commit comments