mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Fix base-path handling in key insert (#7775)
This fixes the handling of base-path when using `key insert`. Before the base-path wasn't setup correctly, as done when starting a node. This resulted in putting the keys into the wrong directory. This pr fixes this by creating the correct base-path/config dir for the keystore. Besides that it also removes the insert command from `subkey` as it doesn't make that much sense. If requested, we could bring it back later.
This commit is contained in:
@@ -263,6 +263,13 @@ impl BasePath {
|
||||
BasePath::Permanenent(path) => path.as_path(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the configuration directory inside this base path.
|
||||
///
|
||||
/// The path looks like `$base_path/chains/$chain_id`
|
||||
pub fn config_dir(&self, chain_id: &str) -> PathBuf {
|
||||
self.path().join("chains").join(chain_id)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<PathBuf> for BasePath {
|
||||
|
||||
Reference in New Issue
Block a user