@@ -367,7 +367,7 @@ where
367
367
let res = self
368
368
. spend_input_from_account (
369
369
outpoint. nonce ( ) ,
370
- outpoint. account ( ) . clone ( ) . into ( ) ,
370
+ outpoint. account ( ) . into ( ) ,
371
371
)
372
372
. and_then ( |_| {
373
373
// If the input spends from delegation account, this means the user is
@@ -496,10 +496,10 @@ where
496
496
match input {
497
497
TxInput :: Utxo ( _) | TxInput :: OrderAccountCommand ( _) => { /* do nothing */ }
498
498
TxInput :: Account ( outpoint) => {
499
- self . unspend_input_from_account ( outpoint. account ( ) . clone ( ) . into ( ) ) ?;
499
+ self . unspend_input_from_account ( outpoint. account ( ) . into ( ) ) ?;
500
500
}
501
501
TxInput :: AccountCommand ( _, cmd) => {
502
- self . unspend_input_from_account ( cmd. clone ( ) . into ( ) ) ?;
502
+ self . unspend_input_from_account ( cmd. into ( ) ) ?;
503
503
}
504
504
} ;
505
505
}
@@ -553,7 +553,7 @@ where
553
553
TxInput :: AccountCommand ( nonce, account_op) => match account_op {
554
554
AccountCommand :: MintTokens ( token_id, amount) => {
555
555
let res = self
556
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
556
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
557
557
. and_then ( |_| {
558
558
self . tokens_accounting_cache
559
559
. mint_tokens ( * token_id, * amount)
@@ -563,7 +563,7 @@ where
563
563
}
564
564
AccountCommand :: UnmintTokens ( ref token_id) => {
565
565
let res = self
566
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
566
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
567
567
. and_then ( |_| {
568
568
// actual amount to unmint is determined by the number of burned tokens in the outputs
569
569
let total_burned =
@@ -582,7 +582,7 @@ where
582
582
}
583
583
AccountCommand :: LockTokenSupply ( token_id) => {
584
584
let res = self
585
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
585
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
586
586
. and_then ( |_| {
587
587
self . tokens_accounting_cache
588
588
. lock_circulating_supply ( * token_id)
@@ -592,7 +592,7 @@ where
592
592
}
593
593
AccountCommand :: FreezeToken ( token_id, is_unfreezable) => {
594
594
let res = self
595
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
595
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
596
596
. and_then ( |_| {
597
597
self . tokens_accounting_cache
598
598
. freeze_token ( * token_id, * is_unfreezable)
@@ -602,7 +602,7 @@ where
602
602
}
603
603
AccountCommand :: UnfreezeToken ( token_id) => {
604
604
let res = self
605
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
605
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
606
606
. and_then ( |_| {
607
607
self . tokens_accounting_cache
608
608
. unfreeze_token ( * token_id)
@@ -612,7 +612,7 @@ where
612
612
}
613
613
AccountCommand :: ChangeTokenAuthority ( token_id, new_authority) => {
614
614
let res = self
615
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
615
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
616
616
. and_then ( |_| {
617
617
self . tokens_accounting_cache
618
618
. change_authority ( * token_id, new_authority. clone ( ) )
@@ -622,7 +622,7 @@ where
622
622
}
623
623
AccountCommand :: ChangeTokenMetadataUri ( token_id, new_metadata_uri) => {
624
624
let res = self
625
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
625
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
626
626
. and_then ( |_| {
627
627
self . tokens_accounting_cache
628
628
. change_metadata_uri ( * token_id, new_metadata_uri. clone ( ) )
@@ -842,7 +842,7 @@ where
842
842
| AccountCommand :: ChangeTokenMetadataUri ( ..) => None ,
843
843
AccountCommand :: ConcludeOrder ( order_id) => {
844
844
let res = self
845
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
845
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
846
846
. and_then ( |_| {
847
847
self . orders_accounting_cache
848
848
. conclude_order ( * order_id)
@@ -852,7 +852,7 @@ where
852
852
}
853
853
AccountCommand :: FillOrder ( order_id, fill, _) => {
854
854
let res = self
855
- . spend_input_from_account ( * nonce, account_op. clone ( ) . into ( ) )
855
+ . spend_input_from_account ( * nonce, account_op. into ( ) )
856
856
. and_then ( |_| {
857
857
self . orders_accounting_cache
858
858
. fill_order ( * order_id, * fill, OrdersVersion :: V0 )
0 commit comments