@@ -182,13 +182,14 @@ mod tests {
182182 env_logger:: try_init ( ) . ok ( ) ;
183183 let alice = PairSigner :: < TestRuntime , _ > :: new ( AccountKeyring :: Alice . pair ( ) ) ;
184184 let bob = PairSigner :: < TestRuntime , _ > :: new ( AccountKeyring :: Bob . pair ( ) ) ;
185+ let bob_address = bob. account_id ( ) . clone ( ) . into ( ) ;
185186 let ( client, _) = test_client ( ) . await ;
186187
187188 let alice_pre = client. account ( alice. account_id ( ) , None ) . await . unwrap ( ) ;
188189 let bob_pre = client. account ( bob. account_id ( ) , None ) . await . unwrap ( ) ;
189190
190191 let event = client
191- . transfer_and_watch ( & alice, & bob . account_id ( ) , 10_000 )
192+ . transfer_and_watch ( & alice, & bob_address , 10_000 )
192193 . await
193194 . expect ( "sending an xt works" )
194195 . transfer ( )
@@ -269,15 +270,17 @@ mod tests {
269270 #[ async_std:: test]
270271 async fn test_transfer_error ( ) {
271272 env_logger:: try_init ( ) . ok ( ) ;
272- let alice = PairSigner :: new ( AccountKeyring :: Alice . pair ( ) ) ;
273- let hans = PairSigner :: new ( Pair :: generate ( ) . 0 ) ;
273+ let alice = PairSigner :: < TestRuntime , _ > :: new ( AccountKeyring :: Alice . pair ( ) ) ;
274+ let alice_addr = alice. account_id ( ) . clone ( ) . into ( ) ;
275+ let hans = PairSigner :: < TestRuntime , _ > :: new ( Pair :: generate ( ) . 0 ) ;
276+ let hans_address = hans. account_id ( ) . clone ( ) . into ( ) ;
274277 let ( client, _) = test_client ( ) . await ;
275278 client
276- . transfer_and_watch ( & alice, hans . account_id ( ) , 100_000_000_000 )
279+ . transfer_and_watch ( & alice, & hans_address , 100_000_000_000 )
277280 . await
278281 . unwrap ( ) ;
279282 let res = client
280- . transfer_and_watch ( & hans, alice . account_id ( ) , 100_000_000_000 )
283+ . transfer_and_watch ( & hans, & alice_addr , 100_000_000_000 )
281284 . await ;
282285 if let Err ( Error :: Runtime ( RuntimeError :: Module ( error) ) ) = res {
283286 let error2 = ModuleError {
@@ -293,15 +296,16 @@ mod tests {
293296 #[ async_std:: test]
294297 async fn test_transfer_subscription ( ) {
295298 env_logger:: try_init ( ) . ok ( ) ;
296- let alice = PairSigner :: new ( AccountKeyring :: Alice . pair ( ) ) ;
299+ let alice = PairSigner :: < TestRuntime , _ > :: new ( AccountKeyring :: Alice . pair ( ) ) ;
297300 let bob = AccountKeyring :: Bob . to_account_id ( ) ;
301+ let bob_addr = bob. clone ( ) . into ( ) ;
298302 let ( client, _) = test_client ( ) . await ;
299303 let sub = client. subscribe_events ( ) . await . unwrap ( ) ;
300304 let mut decoder = EventsDecoder :: < TestRuntime > :: new ( client. metadata ( ) . clone ( ) ) ;
301305 decoder. with_balances ( ) ;
302306 let mut sub = EventSubscription :: < TestRuntime > :: new ( sub, decoder) ;
303307 sub. filter_event :: < TransferEvent < _ > > ( ) ;
304- client. transfer ( & alice, & bob , 10_000 ) . await . unwrap ( ) ;
308+ client. transfer ( & alice, & bob_addr , 10_000 ) . await . unwrap ( ) ;
305309 let raw = sub. next ( ) . await . unwrap ( ) . unwrap ( ) ;
306310 let event = TransferEvent :: < TestRuntime > :: decode ( & mut & raw . data[ ..] ) . unwrap ( ) ;
307311 assert_eq ! (
0 commit comments