@@ -5,7 +5,7 @@ use std::ops::DerefMut;
55use std:: time:: Duration ;
66
77use ethers:: abi:: AbiDecode ;
8- use ethers:: types:: { H160 , Transaction as EthersTransaction } ;
8+ use ethers:: types:: { Transaction as EthersTransaction , H160 } ;
99use fleek_crypto:: {
1010 ClientPublicKey ,
1111 ConsensusPublicKey ,
@@ -15,7 +15,6 @@ use fleek_crypto::{
1515} ;
1616use hp_fixed:: unsigned:: HpUfixed ;
1717use lazy_static:: lazy_static;
18- use lightning_interfaces:: ToDigest ;
1918use lightning_interfaces:: types:: {
2019 AccountInfo ,
2120 Blake3Hash ,
@@ -28,9 +27,6 @@ use lightning_interfaces::types::{
2827 Epoch ,
2928 ExecutionData ,
3029 ExecutionError ,
31- MAX_MEASUREMENTS_PER_TX ,
32- MAX_MEASUREMENTS_SUBMIT ,
33- MAX_UPDATES_CONTENT_REGISTRY ,
3430 Metadata ,
3531 MintInfo ,
3632 NodeIndex ,
@@ -59,7 +55,11 @@ use lightning_interfaces::types::{
5955 UpdateRequest ,
6056 Value ,
6157 WithdrawInfo ,
58+ MAX_MEASUREMENTS_PER_TX ,
59+ MAX_MEASUREMENTS_SUBMIT ,
60+ MAX_UPDATES_CONTENT_REGISTRY ,
6261} ;
62+ use lightning_interfaces:: ToDigest ;
6363use lightning_utils:: eth:: fleek_contract:: FleekContractCalls ;
6464use lightning_utils:: eth:: {
6565 ApproveClientKeyCall ,
@@ -522,12 +522,15 @@ impl<B: Backend> StateExecutor<B> {
522522 return TransactionResponse :: Revert ( ExecutionError :: InsufficientBalance ) ;
523523 }
524524 account. flk_balance -= amount. clone ( ) ;
525- self . withdraws . set ( withdraw_id, WithdrawInfo {
526- epoch : 0 ,
527- token : Tokens :: FLK ,
528- receiver,
529- amount,
530- } ) ;
525+ self . withdraws . set (
526+ withdraw_id,
527+ WithdrawInfo {
528+ epoch : 0 ,
529+ token : Tokens :: FLK ,
530+ receiver,
531+ amount,
532+ } ,
533+ ) ;
531534 self . metadata
532535 . set ( Metadata :: WithdrawId , Value :: WithdrawId ( withdraw_id + 1 ) ) ;
533536 } ,
@@ -538,12 +541,15 @@ impl<B: Backend> StateExecutor<B> {
538541 return TransactionResponse :: Revert ( ExecutionError :: InsufficientBalance ) ;
539542 }
540543 account. stables_balance -= amount. clone ( ) ;
541- self . withdraws . set ( withdraw_id, WithdrawInfo {
542- epoch : 0 ,
543- token : Tokens :: USDC ,
544- receiver,
545- amount : amount. convert_precision :: < 18 > ( ) ,
546- } ) ;
544+ self . withdraws . set (
545+ withdraw_id,
546+ WithdrawInfo {
547+ epoch : 0 ,
548+ token : Tokens :: USDC ,
549+ receiver,
550+ amount : amount. convert_precision :: < 18 > ( ) ,
551+ } ,
552+ ) ;
547553 self . metadata
548554 . set ( Metadata :: WithdrawId , Value :: WithdrawId ( withdraw_id + 1 ) ) ;
549555 } ,
0 commit comments