From f97c588f9f167531cfe7a8c2c46f6a99f13eaeb8 Mon Sep 17 00:00:00 2001 From: haerdib Date: Tue, 19 Dec 2023 10:36:30 +0100 Subject: [PATCH] add test --- testing/examples/chain_tests.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testing/examples/chain_tests.rs b/testing/examples/chain_tests.rs index 3cf6cd591..973a725ba 100644 --- a/testing/examples/chain_tests.rs +++ b/testing/examples/chain_tests.rs @@ -15,8 +15,9 @@ //! Tests for the chain rpc interface functions. +use sp_keyring::AccountKeyring; use substrate_api_client::{ - ac_primitives::AssetRuntimeConfig, + ac_primitives::{DefaultRuntimeConfig, ExtrinsicSigner}, rpc::{HandleSubscription, JsonrpseeClient}, Api, GetChainInfo, SubscribeChain, }; @@ -25,7 +26,9 @@ use substrate_api_client::{ async fn main() { // Setup let client = JsonrpseeClient::with_default_url().unwrap(); - let api = Api::::new(client).unwrap(); + let mut api = Api::::new(client).unwrap(); + let signer = AccountKeyring::Alice.pair(); + api.set_signer(ExtrinsicSigner::::new(signer)); // GetChainInfo let finalized_header_hash = api.get_finalized_head().unwrap().unwrap();