Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Sep 11, 2024
1 parent 744904a commit 25a3c8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion testing/async/examples/author_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ use substrate_api_client::{
rpc::{HandleSubscription, JsonrpseeClient},
Api, SubmitAndWatch, SubmitExtrinsic, TransactionStatus, XtStatus,
};
use westend_runtime::{AccountId, BalancesCall, RuntimeCall};
use westend_runtime::{BalancesCall, RuntimeCall};

type ExtrinsicSigner = GenericExtrinsicSigner<WestendRuntimeConfig>;
type ExtrinsicAddressOf<Signer> = <Signer as SignExtrinsic<AccountId>>::ExtrinsicAddress;
type Hash = <WestendRuntimeConfig as Config>::Hash;
type MyApi = Api<WestendRuntimeConfig, JsonrpseeClient>;
type Index = <WestendRuntimeConfig as Config>::Index;
type AccountId = <WestendRuntimeConfig as Config>::AccountId;

#[tokio::main]
async fn main() {
Expand Down
12 changes: 8 additions & 4 deletions testing/async/examples/pallet_contract_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
use codec::Decode;
use sp_keyring::AccountKeyring;
use substrate_api_client::{
ac_compose_macros::primitives::WestendRuntimeConfig, ac_node_api::StaticEvent,
ac_primitives::Determinism, extrinsic::ContractsExtrinsics, rpc::JsonrpseeClient, Api,
SubmitAndWatch, XtStatus,
ac_compose_macros::primitives::{Config, WestendRuntimeConfig},
ac_node_api::StaticEvent,
ac_primitives::Determinism,
extrinsic::ContractsExtrinsics,
rpc::JsonrpseeClient,
Api, SubmitAndWatch, XtStatus,
};
use westend_runtime::AccountId;

type AccountId = <WestendRuntimeConfig as Config>::AccountId;

// To test this example with CI we run it against the Substrate kitchensink node, which uses the asset pallet.
// Therefore, we need to use the `AssetRuntimeConfig` in this example.
Expand Down
2 changes: 1 addition & 1 deletion testing/async/examples/state_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn main() {
let _account_info: AccountData =
api.get_storage_map("System", "Account", &alice, None).await.unwrap().unwrap();

let era_stakers: ErasStakers = api
let _era_stakers: ErasStakers = api
.get_storage_double_map(
"Staking",
"ErasStakersOverview",
Expand Down

0 comments on commit 25a3c8b

Please sign in to comment.