mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 07:37:57 +00:00
Removed dependance on rococo_parachain_runtime for unrelated stuff (#1500)
* Clean misleading imports `rococo_parachain_runtime::{AccountId, AuraId}`
* Remove dependance on `rococo_parachain_runtime` for unrelated stuff
* fmt + rebase fix
* Addressing review comments
* Addressing review comments
* Fix for `purge_chain_works` works now with `rococo-local` and purge command needs to allow `rococo-native`
This commit is contained in:
@@ -14,7 +14,7 @@ pub type ChainSpec =
|
||||
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
|
||||
|
||||
/// Helper function to generate a crypto pair from seed
|
||||
pub fn get_public_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
|
||||
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
|
||||
TPublic::Pair::from_string(&format!("//{}", seed), None)
|
||||
.expect("static values are valid; qed")
|
||||
.public()
|
||||
@@ -43,7 +43,7 @@ type AccountPublic = <Signature as Verify>::Signer;
|
||||
///
|
||||
/// This function's return type must always match the session keys of the chain in tuple format.
|
||||
pub fn get_collator_keys_from_seed(seed: &str) -> AuraId {
|
||||
get_public_from_seed::<AuraId>(seed)
|
||||
get_from_seed::<AuraId>(seed)
|
||||
}
|
||||
|
||||
/// Helper function to generate an account ID from seed
|
||||
@@ -51,7 +51,7 @@ pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
|
||||
where
|
||||
AccountPublic: From<<TPublic::Pair as Pair>::Public>,
|
||||
{
|
||||
AccountPublic::from(get_public_from_seed::<TPublic>(seed)).into_account()
|
||||
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
|
||||
}
|
||||
|
||||
/// Generate the session keys from individual elements.
|
||||
|
||||
Reference in New Issue
Block a user