@@ -33,7 +33,7 @@ pub trait Environment<C: ChainWithBalances>: Send + Sync + 'static {
3333 /// Return current runtime version.
3434 async fn runtime_version ( & mut self ) -> Result < RuntimeVersion , String > ;
3535 /// Return free native balance of the account on the chain.
36- async fn free_native_balance ( & mut self , account : C :: AccountId ) -> Result < C :: NativeBalance , String > ;
36+ async fn free_native_balance ( & mut self , account : C :: AccountId ) -> Result < C :: Balance , String > ;
3737
3838 /// Return current time.
3939 fn now ( & self ) -> Instant {
@@ -85,7 +85,7 @@ pub fn abort_on_spec_version_change<C: ChainWithBalances>(mut env: impl Environm
8585pub fn abort_when_account_balance_decreased < C : ChainWithBalances > (
8686 mut env : impl Environment < C > ,
8787 account_id : C :: AccountId ,
88- maximal_decrease : C :: NativeBalance ,
88+ maximal_decrease : C :: Balance ,
8989) {
9090 const DAY : Duration = Duration :: from_secs ( 60 * 60 * 24 ) ;
9191
@@ -155,7 +155,7 @@ impl<C: ChainWithBalances> Environment<C> for Client<C> {
155155 Client :: < C > :: runtime_version ( self ) . await . map_err ( |e| e. to_string ( ) )
156156 }
157157
158- async fn free_native_balance ( & mut self , account : C :: AccountId ) -> Result < C :: NativeBalance , String > {
158+ async fn free_native_balance ( & mut self , account : C :: AccountId ) -> Result < C :: Balance , String > {
159159 Client :: < C > :: free_native_balance ( self , account)
160160 . await
161161 . map_err ( |e| e. to_string ( ) )
@@ -191,11 +191,10 @@ mod tests {
191191 type SignedBlock =
192192 sp_runtime:: generic:: SignedBlock < sp_runtime:: generic:: Block < Self :: Header , sp_runtime:: OpaqueExtrinsic > > ;
193193 type Call = ( ) ;
194+ type Balance = u32 ;
194195 }
195196
196197 impl ChainWithBalances for TestChain {
197- type NativeBalance = u32 ;
198-
199198 fn account_info_storage_key ( _account_id : & u32 ) -> sp_core:: storage:: StorageKey {
200199 unreachable ! ( )
201200 }
0 commit comments