Skip to content

Commit

Permalink
Logic to use the key_name parameter from the config to add key. Remov…
Browse files Browse the repository at this point in the history
…ed name parameter from keys add cmd (#363)
  • Loading branch information
andynog committed Nov 18, 2020
1 parent c45aa58 commit 03e9880
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions relayer-cli/src/commands/keys/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ pub struct KeyAddCmd {
#[options(free, help = "identifier of the chain")]
chain_id: Option<String>,

#[options(free, help = "the key name")]
name: Option<String>,

#[options(free, help = "the key path and filename")]
file: Option<String>,
}
Expand All @@ -33,18 +30,13 @@ impl KeyAddCmd {
"Invalid chain identifier. Cannot retrieve the chain configuration".to_string()
})?;

let key_name = self
.name
.clone()
.ok_or_else(|| "missing key name".to_string())?;

let key_filename = self
.file
.clone()
.ok_or_else(|| "missing signer key file".to_string())?;

Ok(KeysAddOptions {
name: key_name,
name: chain_config.key_name.clone(),
file: key_filename,
chain_config: chain_config.clone(),
})
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/keyring/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use tendermint::account::Id as AccountId;

pub const KEYSTORE_DEFAULT_FOLDER: &str = ".rrly/keys/";
pub const KEYSTORE_TEST_BACKEND: &str = "keyring-test";
pub const KEYSTORE_FILE_EXTENSION: &str = "key";
pub const KEYSTORE_FILE_EXTENSION: &str = "json";

pub type Address = Vec<u8>;

Expand Down

0 comments on commit 03e9880

Please sign in to comment.