Repository: scs/substrate-api-client (language: rust)

Issue:
`DefaultRuntimeConfig` in ExtrinsicSigner::<..> does not work
When initializing the Api with `DefaultRuntimeConfig` and a signer as following:
```rust
let mut api = Api::<DefaultRuntimeConfig, _>::new(client).unwrap();
api.set_signer(GenericExtrinsicSigner::<DefaultRuntimeConfig>::new(sudoer));
```

It does not compile due to:
```
note: expected struct `ExtrinsicSigner<AssetRuntimeConfig>`
   found struct `ExtrinsicSigner<WithExtrinsicParams<AssetRuntimeConfig, GenericExtrinsicParams<AssetRuntimeConfig, PlainTip<u128>>>>`
label: expected `ExtrinsicSigner<AssetRuntimeConfig>`, found `ExtrinsicSigner<WithExtrinsicParams<..., ...>>`
```

I suppose the error comes from the definition of `DefaultRuntimeConfig`:
```rust
/// Standard runtime config for Substrate and Polkadot nodes.
pub type DefaultRuntimeConfig =
	WithExtrinsicParams<AssetRuntimeConfig, PlainTipExtrinsicParams<AssetRuntimeConfig>>;
```


Workaround:
```rust
api.set_signer(GenericExtrinsicSigner::<_>::new(sudoer));
```
But that is still not nice. Isn't there a better way to define the `ExtrinsicSigner`? 


Discussion / hints:
I have opted not to define any extrinsic signed in the worker, as you can simply do:

```rust
api.set_signer(sudoer.into());
```

What is your take on that?
Perfect workaround and the way everybody will most likely do it. But it is still a workaround in the end, is it not? The compiler still expects a hardcoded `AssetRuntimeConfig` for `ExtrinsicSigner`. Currently, that's not a problem, but what happens if the user defines its own Config with entirely different parameters, that also affects the Signer? Might cause some problems.

Fix patch:
diff --git a/examples/examples/benchmark_bulk_xt.rs b/examples/examples/benchmark_bulk_xt.rs
index b42156566..e0183ad05 100644
--- a/examples/examples/benchmark_bulk_xt.rs
+++ b/examples/examples/benchmark_bulk_xt.rs
@@ -46,7 +46,7 @@ async fn main() {
 	let signer = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::new(signer));
+	api.set_signer(signer.into());
 
 	let recipient: ExtrinsicAddressOf<ExtrinsicSigner> = AccountKeyring::Bob.to_account_id().into();
 	// We use a manual nonce input here, because otherwise the api retrieves the nonce via getter and needs
diff --git a/examples/examples/check_extrinsic_events.rs b/examples/examples/check_extrinsic_events.rs
index f9cf44ca6..3a4bdfcb7 100644
--- a/examples/examples/check_extrinsic_events.rs
+++ b/examples/examples/check_extrinsic_events.rs
@@ -16,7 +16,7 @@
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
 	ac_node_api::EventDetails,
-	ac_primitives::{AssetRuntimeConfig, Config, ExtrinsicSigner},
+	ac_primitives::{AssetRuntimeConfig, Config},
 	extrinsic::BalancesExtrinsics,
 	rpc::JsonrpseeClient,
 	Api, GetAccountInformation, SubmitAndWatch, TransactionStatus, XtStatus,
@@ -37,7 +37,7 @@ async fn main() {
 	let alice_signer = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice_signer));
+	api.set_signer(alice_signer.into());
 
 	let alice = AccountKeyring::Alice.to_account_id();
 	let balance_of_alice = api.get_account_data(&alice).unwrap().unwrap().free;
diff --git a/examples/examples/contract_instantiate_with_code.rs b/examples/examples/contract_instantiate_with_code.rs
index 7f017ab33..a4940716b 100644
--- a/examples/examples/contract_instantiate_with_code.rs
+++ b/examples/examples/contract_instantiate_with_code.rs
@@ -20,8 +20,7 @@ use kitchensink_runtime::AccountId;
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
 	ac_compose_macros::primitives::AssetRuntimeConfig, ac_node_api::StaticEvent,
-	ac_primitives::ExtrinsicSigner, extrinsic::ContractsExtrinsics, rpc::JsonrpseeClient, Api,
-	SubmitAndWatch, XtStatus,
+	extrinsic::ContractsExtrinsics, rpc::JsonrpseeClient, Api, SubmitAndWatch, XtStatus,
 };
 
 // To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
@@ -49,7 +48,7 @@ async fn main() {
 	let signer = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<_>::new(signer));
+	api.set_signer(signer.into());
 
 	println!("[+] Alice's Account Nonce is {}", api.get_nonce().unwrap());
 
diff --git a/examples/examples/custom_nonce.rs b/examples/examples/custom_nonce.rs
index 546b80e73..97979a3b6 100644
--- a/examples/examples/custom_nonce.rs
+++ b/examples/examples/custom_nonce.rs
@@ -20,7 +20,7 @@ use kitchensink_runtime::{BalancesCall, RuntimeCall};
 use sp_keyring::AccountKeyring;
 use sp_runtime::{generic::Era, MultiAddress};
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner, GenericAdditionalParams},
+	ac_primitives::{AssetRuntimeConfig, GenericAdditionalParams},
 	rpc::JsonrpseeClient,
 	Api, Error, GetChainInfo, SubmitAndWatch, UnexpectedTxStatus, XtStatus,
 };
@@ -38,7 +38,7 @@ async fn main() {
 	let signer = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(signer));
+	api.set_signer(signer.into());
 
 	// Information for Era for mortal transactions.
 	let last_finalized_header_hash = api.get_finalized_head().unwrap().unwrap();
diff --git a/examples/examples/get_account_identity.rs b/examples/examples/get_account_identity.rs
index 473c672dd..b57ebe062 100644
--- a/examples/examples/get_account_identity.rs
+++ b/examples/examples/get_account_identity.rs
@@ -22,7 +22,7 @@ use sp_core::{crypto::Pair, H256};
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
 	ac_compose_macros::compose_extrinsic,
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner, UncheckedExtrinsicV4},
+	ac_primitives::{AssetRuntimeConfig, UncheckedExtrinsicV4},
 	rpc::JsonrpseeClient,
 	Api, GetStorage, SubmitAndWatch, XtStatus,
 };
@@ -46,7 +46,7 @@ async fn main() {
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let signer = AccountKeyring::Alice.pair();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(signer.clone()));
+	api.set_signer(signer.clone().into());
 
 	// Fill Identity storage.
 	let info = IdentityInfo::<MaxAdditionalFields> {
diff --git a/examples/examples/get_storage.rs b/examples/examples/get_storage.rs
index 0cb715f0a..eb02737dc 100644
--- a/examples/examples/get_storage.rs
+++ b/examples/examples/get_storage.rs
@@ -20,7 +20,7 @@ use kitchensink_runtime::AccountId;
 use pallet_staking::Exposure;
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, Config, ExtrinsicSigner},
+	ac_primitives::{AssetRuntimeConfig, Config},
 	rpc::JsonrpseeClient,
 	Api, GetAccountInformation, GetStorage,
 };
@@ -66,7 +66,7 @@ async fn main() {
 
 	// get Alice's AccountNonce with api.get_nonce()
 	let signer = AccountKeyring::Alice.pair();
-	api.set_signer(ExtrinsicSigner::<_>::new(signer));
+	api.set_signer(signer.into());
 	println!("[+] Alice's Account Nonce is {}", api.get_nonce().unwrap());
 
 	println!(
diff --git a/examples/examples/runtime_update_async.rs b/examples/examples/runtime_update_async.rs
index 4de20e52f..3d313abfa 100644
--- a/examples/examples/runtime_update_async.rs
+++ b/examples/examples/runtime_update_async.rs
@@ -16,7 +16,7 @@ use sp_keyring::AccountKeyring;
 use sp_weights::Weight;
 use substrate_api_client::{
 	ac_compose_macros::{compose_call, compose_extrinsic},
-	ac_primitives::{AssetRuntimeConfig, Config, ExtrinsicSigner as GenericExtrinsicSigner},
+	ac_primitives::{AssetRuntimeConfig, Config},
 	api_client::UpdateRuntime,
 	rpc::JsonrpseeClient,
 	rpc_api::RuntimeUpdateDetector,
@@ -25,7 +25,6 @@ use substrate_api_client::{
 use tokio::select;
 use tokio_util::sync::CancellationToken;
 
-type ExtrinsicSigner = GenericExtrinsicSigner<AssetRuntimeConfig>;
 type Hash = <AssetRuntimeConfig as Config>::Hash;
 
 #[cfg(feature = "sync-examples")]
@@ -64,7 +63,7 @@ async fn main() {
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).await.unwrap();
 	let sudoer = AccountKeyring::Alice.pair();
-	api.set_signer(ExtrinsicSigner::new(sudoer));
+	api.set_signer(sudoer.into());
 
 	let subscription = api.subscribe_events().await.unwrap();
 	let mut update_detector: RuntimeUpdateDetector<Hash, JsonrpseeClient> =
diff --git a/examples/examples/runtime_update_sync.rs b/examples/examples/runtime_update_sync.rs
index b9b26285b..c02e13cdc 100644
--- a/examples/examples/runtime_update_sync.rs
+++ b/examples/examples/runtime_update_sync.rs
@@ -21,14 +21,13 @@ use sp_weights::Weight;
 use std::{sync::Arc, thread};
 use substrate_api_client::{
 	ac_compose_macros::{compose_call, compose_extrinsic},
-	ac_primitives::{AssetRuntimeConfig, Config, ExtrinsicSigner as GenericExtrinsicSigner},
+	ac_primitives::{AssetRuntimeConfig, Config},
 	api_client::UpdateRuntime,
 	rpc::JsonrpseeClient,
 	rpc_api::RuntimeUpdateDetector,
 	Api, SubmitAndWatch, SubscribeEvents, XtStatus,
 };
 
-type ExtrinsicSigner = GenericExtrinsicSigner<AssetRuntimeConfig>;
 type Hash = <AssetRuntimeConfig as Config>::Hash;
 
 #[cfg(not(feature = "sync-examples"))]
@@ -65,7 +64,7 @@ async fn main() {
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
 	let sudoer = AccountKeyring::Alice.pair();
-	api.set_signer(ExtrinsicSigner::new(sudoer));
+	api.set_signer(sudoer.into());
 
 	let subscription = api.subscribe_events().unwrap();
 	let cancellation = Arc::new(AtomicBool::new(false));
diff --git a/examples/examples/staking_batch_payout.rs b/examples/examples/staking_batch_payout.rs
index e66c2787f..1c11988b2 100644
--- a/examples/examples/staking_batch_payout.rs
+++ b/examples/examples/staking_batch_payout.rs
@@ -16,7 +16,7 @@ use pallet_staking::{ActiveEraInfo, Exposure};
 use sp_keyring::AccountKeyring;
 use sp_runtime::{app_crypto::Ss58Codec, AccountId32};
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
+	ac_primitives::AssetRuntimeConfig,
 	extrinsic::{StakingExtrinsics, UtilityExtrinsics},
 	rpc::JsonrpseeClient,
 	Api, GetStorage, SubmitAndWatch, XtStatus,
@@ -55,7 +55,7 @@ async fn main() {
 	let alice = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice));
+	api.set_signer(alice.into());
 
 	// Give a valid validator account address. In the kitchinsink runtime, this is Alice.
 	let validator_account = AccountKeyring::Alice.to_account_id();
diff --git a/examples/examples/sudo.rs b/examples/examples/sudo.rs
index 850ec65f6..43eb1a13f 100644
--- a/examples/examples/sudo.rs
+++ b/examples/examples/sudo.rs
@@ -52,7 +52,7 @@ async fn main() {
 	let sudoer = AccountKeyring::Alice.pair();
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::new(sudoer));
+	api.set_signer(sudoer.into());
 
 	// Set the recipient of newly issued funds.
 	let recipient = AccountKeyring::Bob.to_account_id();
diff --git a/examples/examples/transfer_with_tungstenite_client.rs b/examples/examples/transfer_with_tungstenite_client.rs
index 2fefa986c..58e10a405 100755
--- a/examples/examples/transfer_with_tungstenite_client.rs
+++ b/examples/examples/transfer_with_tungstenite_client.rs
@@ -21,9 +21,7 @@ use sp_core::{
 };
 use sp_runtime::MultiAddress;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	extrinsic::BalancesExtrinsics,
-	rpc::TungsteniteRpcClient,
+	ac_primitives::AssetRuntimeConfig, extrinsic::BalancesExtrinsics, rpc::TungsteniteRpcClient,
 	Api, GetAccountInformation, SubmitAndWatch, XtStatus,
 };
 
@@ -46,7 +44,7 @@ fn main() {
 	// Initialize api and set the signer (sender) that is used to sign the extrinsics.
 	let client = TungsteniteRpcClient::with_default_url(100);
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice.clone()));
+	api.set_signer(alice.clone().into());
 
 	// Retrieve bobs current balance.
 	let bob = sr25519::Public::from_ss58check("5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty")
diff --git a/examples/examples/transfer_with_ws_client.rs b/examples/examples/transfer_with_ws_client.rs
index 2adb39bbf..718ebd635 100755
--- a/examples/examples/transfer_with_ws_client.rs
+++ b/examples/examples/transfer_with_ws_client.rs
@@ -21,10 +21,8 @@ use sp_core::{
 };
 use sp_runtime::MultiAddress;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	extrinsic::BalancesExtrinsics,
-	rpc::WsRpcClient,
-	Api, GetAccountInformation, SubmitAndWatch, XtStatus,
+	ac_primitives::AssetRuntimeConfig, extrinsic::BalancesExtrinsics, rpc::WsRpcClient, Api,
+	GetAccountInformation, SubmitAndWatch, XtStatus,
 };
 
 // To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
@@ -46,7 +44,7 @@ fn main() {
 	// Initialize api and set the signer (sender) that is used to sign the extrinsics.
 	let client = WsRpcClient::with_default_url();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice.clone()));
+	api.set_signer(alice.clone().into());
 
 	// Retrieve bobs current balance.
 	let bob = sr25519::Public::from_ss58check("5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty")
diff --git a/primitives/src/config/mod.rs b/primitives/src/config/mod.rs
index cc1de2eef..c630c6766 100644
--- a/primitives/src/config/mod.rs
+++ b/primitives/src/config/mod.rs
@@ -20,7 +20,7 @@ use sp_runtime::traits::{
 	MaybeSerializeDeserialize,
 };
 
-use crate::{extrinsic_params, SignExtrinsic};
+use crate::{extrinsic_params, ExtrinsicSigner, SignExtrinsic};
 
 pub use asset_runtime_config::*;
 pub use default_runtime_config::*;
@@ -160,7 +160,7 @@ impl<T: Config, E: extrinsic_params::ExtrinsicParams<T::Index, T::Hash>> Config
 	type AccountData = T::AccountData;
 	type ExtrinsicParams = E;
 	type CryptoKey = T::CryptoKey;
-	type ExtrinsicSigner = T::ExtrinsicSigner;
+	type ExtrinsicSigner = ExtrinsicSigner<Self>;
 	type Block = T::Block;
 	type Balance = T::Balance;
 	type ContractCurrency = T::ContractCurrency;


Test patch:
diff --git a/testing/examples/author_tests.rs b/testing/examples/author_tests.rs
index 87168f662..4d25fddca 100644
--- a/testing/examples/author_tests.rs
+++ b/testing/examples/author_tests.rs
@@ -40,7 +40,7 @@ async fn main() {
 	let alice_pair = AccountKeyring::Alice.pair();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
 
-	api.set_signer(ExtrinsicSigner::new(alice_pair));
+	api.set_signer(alice_pair.into());
 
 	let bob: ExtrinsicAddressOf<ExtrinsicSigner> = AccountKeyring::Bob.to_account_id().into();
 
diff --git a/testing/examples/chain_tests.rs b/testing/examples/chain_tests.rs
index 3cf6cd591..4e12dba9c 100644
--- a/testing/examples/chain_tests.rs
+++ b/testing/examples/chain_tests.rs
@@ -13,10 +13,12 @@
 	limitations under the License.
 */
 
-//! Tests for the chain rpc interface functions.
+//! Tests for the chain rpc interface functions, including testing the DefaultRuntimeConfig
+//! and Signer generation for the DefaultRuntimeConfig.
 
+use sp_keyring::AccountKeyring;
 use substrate_api_client::{
-	ac_primitives::AssetRuntimeConfig,
+	ac_primitives::{DefaultRuntimeConfig, ExtrinsicSigner},
 	rpc::{HandleSubscription, JsonrpseeClient},
 	Api, GetChainInfo, SubscribeChain,
 };
@@ -25,7 +27,9 @@ use substrate_api_client::{
 async fn main() {
 	// Setup
 	let client = JsonrpseeClient::with_default_url().unwrap();
-	let api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
+	let mut api = Api::<DefaultRuntimeConfig, _>::new(client).unwrap();
+	let signer = AccountKeyring::Alice.pair();
+	api.set_signer(ExtrinsicSigner::<DefaultRuntimeConfig>::new(signer));
 
 	// GetChainInfo
 	let finalized_header_hash = api.get_finalized_head().unwrap().unwrap();
diff --git a/testing/examples/dispatch_errors_tests.rs b/testing/examples/dispatch_errors_tests.rs
index bb3201161..6700441aa 100644
--- a/testing/examples/dispatch_errors_tests.rs
+++ b/testing/examples/dispatch_errors_tests.rs
@@ -18,10 +18,8 @@
 use sp_keyring::AccountKeyring;
 use sp_runtime::MultiAddress;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	extrinsic::BalancesExtrinsics,
-	rpc::JsonrpseeClient,
-	Api, GetAccountInformation, SubmitAndWatch, XtStatus,
+	ac_primitives::AssetRuntimeConfig, extrinsic::BalancesExtrinsics, rpc::JsonrpseeClient, Api,
+	GetAccountInformation, SubmitAndWatch, XtStatus,
 };
 
 #[tokio::main]
@@ -45,7 +43,7 @@ async fn main() {
 	println!("[+] One's Free Balance is {}\n", balance_of_one);
 
 	//BadOrigin
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(bob_signer));
+	api.set_signer(bob_signer.into());
 	//Can only be called by root
 	let xt = api.balance_force_set_balance(MultiAddress::Id(alice.clone()), 10);
 
@@ -55,7 +53,7 @@ async fn main() {
 	println!("[+] BadOrigin error: Bob can't force set balance");
 
 	//BelowMinimum
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice_signer));
+	api.set_signer(alice_signer.into());
 	let xt = api.balance_transfer_allow_death(MultiAddress::Id(one.clone()), 999999);
 	let result = api.submit_and_watch_extrinsic_until(xt, XtStatus::InBlock);
 	assert!(result.is_err());
diff --git a/testing/examples/events_tests.rs b/testing/examples/events_tests.rs
index de8db04a8..9debcc6c5 100644
--- a/testing/examples/events_tests.rs
+++ b/testing/examples/events_tests.rs
@@ -21,7 +21,7 @@ use kitchensink_runtime::RuntimeEvent;
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
 	ac_node_api::{EventDetails, StaticEvent},
-	ac_primitives::{AssetRuntimeConfig, Config, ExtrinsicSigner},
+	ac_primitives::{AssetRuntimeConfig, Config},
 	extrinsic::BalancesExtrinsics,
 	rpc::JsonrpseeClient,
 	Api, FetchEvents, GetChainInfo, SubmitAndWatch, SubscribeEvents, XtStatus,
@@ -46,7 +46,7 @@ async fn main() {
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let alice_pair = AccountKeyring::Alice.pair();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice_pair));
+	api.set_signer(alice_pair.into());
 
 	let bob = AccountKeyring::Bob.to_account_id();
 
diff --git a/testing/examples/frame_system_tests.rs b/testing/examples/frame_system_tests.rs
index 32f5a4ec9..3870b885f 100644
--- a/testing/examples/frame_system_tests.rs
+++ b/testing/examples/frame_system_tests.rs
@@ -19,10 +19,8 @@ use codec::Decode;
 use frame_support::dispatch::DispatchInfo;
 use sp_keyring::AccountKeyring;
 use substrate_api_client::{
-	ac_node_api::StaticEvent,
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	rpc::JsonrpseeClient,
-	Api, GetAccountInformation, SystemApi,
+	ac_node_api::StaticEvent, ac_primitives::AssetRuntimeConfig, rpc::JsonrpseeClient, Api,
+	GetAccountInformation, SystemApi,
 };
 
 /// Check out frame_system::Event::ExtrinsicSuccess:
@@ -42,7 +40,7 @@ async fn main() {
 	let client = JsonrpseeClient::with_default_url().unwrap();
 	let alice_pair = AccountKeyring::Alice.pair();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::new(alice_pair));
+	api.set_signer(alice_pair.into());
 
 	let alice = AccountKeyring::Alice.to_account_id();
 
diff --git a/testing/examples/tungstenite_client_test.rs b/testing/examples/tungstenite_client_test.rs
index 8d4694ee6..ecfd620a0 100755
--- a/testing/examples/tungstenite_client_test.rs
+++ b/testing/examples/tungstenite_client_test.rs
@@ -19,9 +19,7 @@ use sp_core::{
 };
 use sp_runtime::MultiAddress;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	extrinsic::BalancesExtrinsics,
-	rpc::TungsteniteRpcClient,
+	ac_primitives::AssetRuntimeConfig, extrinsic::BalancesExtrinsics, rpc::TungsteniteRpcClient,
 	Api, GetAccountInformation, SubmitAndWatch, XtStatus,
 };
 
@@ -34,7 +32,7 @@ fn main() {
 	.unwrap();
 	let client = TungsteniteRpcClient::with_default_url(100);
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice.clone()));
+	api.set_signer(alice.clone().into());
 
 	let bob = sr25519::Public::from_ss58check("5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty")
 		.unwrap();
diff --git a/testing/examples/ws_client_test.rs b/testing/examples/ws_client_test.rs
index 10dbd0866..8c33662d5 100755
--- a/testing/examples/ws_client_test.rs
+++ b/testing/examples/ws_client_test.rs
@@ -19,10 +19,8 @@ use sp_core::{
 };
 use sp_runtime::MultiAddress;
 use substrate_api_client::{
-	ac_primitives::{AssetRuntimeConfig, ExtrinsicSigner},
-	extrinsic::BalancesExtrinsics,
-	rpc::WsRpcClient,
-	Api, GetAccountInformation, SubmitAndWatch, XtStatus,
+	ac_primitives::AssetRuntimeConfig, extrinsic::BalancesExtrinsics, rpc::WsRpcClient, Api,
+	GetAccountInformation, SubmitAndWatch, XtStatus,
 };
 
 fn main() {
@@ -34,7 +32,7 @@ fn main() {
 	.unwrap();
 	let client = WsRpcClient::with_default_url();
 	let mut api = Api::<AssetRuntimeConfig, _>::new(client).unwrap();
-	api.set_signer(ExtrinsicSigner::<AssetRuntimeConfig>::new(alice.clone()));
+	api.set_signer(alice.clone().into());
 
 	let bob = sr25519::Public::from_ss58check("5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty")
 		.unwrap();