keys import (#1240)
* pattern importing * tests for import * cli options for account import * [options] for import also * removed globbing * removed glob crate refs
This commit is contained in:
@@ -23,7 +23,8 @@ Parity. Ethereum Client.
|
||||
|
||||
Usage:
|
||||
parity daemon <pid-file> [options]
|
||||
parity account (new | list) [options]
|
||||
parity account (new | list ) [options]
|
||||
parity account import <path>... [options]
|
||||
parity import [ <file> ] [options]
|
||||
parity export [ <file> ] [options]
|
||||
parity signer new-token [options]
|
||||
@@ -212,6 +213,7 @@ pub struct Args {
|
||||
pub cmd_new_token: bool,
|
||||
pub arg_pid_file: String,
|
||||
pub arg_file: Option<String>,
|
||||
pub arg_path: Vec<String>,
|
||||
pub flag_chain: String,
|
||||
pub flag_db_path: String,
|
||||
pub flag_identity: String,
|
||||
|
||||
@@ -482,6 +482,11 @@ fn execute_account_cli(conf: Configuration) {
|
||||
for &(addr, _) in &secret_store.accounts().unwrap() {
|
||||
println!("{:?}", addr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if conf.args.cmd_import {
|
||||
let imported = util::keys::import_keys_paths(&mut secret_store, &conf.args.arg_path).unwrap();
|
||||
println!("Imported {} keys", imported);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user