Skip to content

Commit

Permalink
remove doubl into and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Jan 11, 2023
1 parent aa0db4f commit 897f5be
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions testing/examples/author_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ use substrate_api_client::{
XtStatus,
};

// Define an extrinsic signer type which sets the generic types of the `GenericExtrinsicSigner`.
// This way, the types don't have to be reassigned with every usage of this type and make
// the code better readable.
type ExtrinsicSigner = GenericExtrinsicSigner<Pair, Signature, Runtime>;

// To access the ExtrinsicAddress type of the ExtrinsicSigner, we need to access the trait `SignExtrinsic`.
// As this is very verbose, we define a simple type here and, at the same time, assign the
// AccountId type of the `SignExtrinsic` trait.
type ExtrinsicAddressOf<Signer> = <Signer as SignExtrinsic<AccountId>>::ExtrinsicAddress;

#[tokio::main]
Expand All @@ -47,7 +40,7 @@ async fn main() {
let bob: ExtrinsicAddressOf<ExtrinsicSigner> = AccountKeyring::Bob.to_account_id().into();

// Submit extrinisc.
let xt0 = api.balance_transfer(bob.clone().into(), 1000);
let xt0 = api.balance_transfer(bob.clone(), 1000);
let _tx_hash = api.submit_extrinsic(xt0).unwrap();

// Submit and watch.
Expand Down

0 comments on commit 897f5be

Please sign in to comment.