@@ -32,6 +32,8 @@ use working_group::{
3232const SEED : u32 = 0 ;
3333const MAX_KILOBYTES_METADATA : u32 = 100 ;
3434
35+ pub type BalanceOf < T > = <T as balances:: Config >:: Balance ;
36+
3537fn assert_last_event < T : Config > ( generic_event : <T as Config >:: RuntimeEvent ) {
3638 let events = System :: < T > :: events ( ) ;
3739 let system_event: <T as frame_system:: Config >:: RuntimeEvent = generic_event. into ( ) ;
@@ -65,7 +67,7 @@ fn member_funded_account<T: Config + membership::Config>() -> (T::AccountId, T::
6567 let handle = handle_from_id ( member_id. saturated_into ( ) ) ;
6668
6769 // Give balance for buying membership
68- let _ = Balances :: < T > :: make_free_balance_be ( & account_id, T :: Balance :: max_value ( ) ) ;
70+ let _ = Balances :: < T > :: make_free_balance_be ( & account_id, BalanceOf :: < T > :: max_value ( ) ) ;
6971
7072 let params = membership:: BuyMembershipParameters {
7173 root_account : account_id. clone ( ) ,
@@ -77,7 +79,7 @@ fn member_funded_account<T: Config + membership::Config>() -> (T::AccountId, T::
7779
7880 Membership :: < T > :: buy_membership ( RawOrigin :: Signed ( account_id. clone ( ) ) . into ( ) , params) . unwrap ( ) ;
7981
80- let _ = Balances :: < T > :: make_free_balance_be ( & account_id, T :: Balance :: max_value ( ) ) ;
82+ let _ = Balances :: < T > :: make_free_balance_be ( & account_id, BalanceOf :: < T > :: max_value ( ) ) ;
8183
8284 Membership :: < T > :: add_staking_account_candidate (
8385 RawOrigin :: Signed ( account_id. clone ( ) ) . into ( ) ,
@@ -872,15 +874,15 @@ benchmarks! {
872874 size: u64 :: MAX ,
873875 ipfs_content_id: Vec :: from_iter( ( 0 ..( i * 1000 ) ) . map( |v| u8 :: MAX ) )
874876 } ,
875- expected_data_size_fee: u128 :: MAX . saturated_into:: <T :: Balance >( ) ,
876- expected_data_object_state_bloat_bond: u128 :: MAX . saturated_into:: <T :: Balance >( )
877+ expected_data_size_fee: u128 :: MAX . saturated_into:: <BalanceOf :: < T > >( ) ,
878+ expected_data_object_state_bloat_bond: u128 :: MAX . saturated_into:: <BalanceOf :: < T > >( )
877879 } ;
878880 let proposal_details = ProposalDetails :: UpdateChannelPayouts (
879881 content:: UpdateChannelPayoutsParameters :: <T > {
880882 commitment: Some ( commitment) ,
881883 payload: Some ( payload) ,
882- min_cashout_allowed: Some ( u128 :: MAX . saturated_into:: <T :: Balance >( ) ) ,
883- max_cashout_allowed: Some ( u128 :: MAX . saturated_into:: <T :: Balance >( ) ) ,
884+ min_cashout_allowed: Some ( u128 :: MAX . saturated_into:: <BalanceOf :: < T > >( ) ) ,
885+ max_cashout_allowed: Some ( u128 :: MAX . saturated_into:: <BalanceOf :: < T > >( ) ) ,
884886 channel_cashouts_enabled: Some ( true ) ,
885887 }
886888 ) ;
0 commit comments