Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tweak cli generate-keys output #3943

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions api/bin/chainflip-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,21 +276,21 @@ fn generate_keys(json: bool, path: Option<PathBuf>, seed_phrase: Option<String>)

impl std::fmt::Display for Keys {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f, "🔑 Node public key: 0x{}", hex::encode(&self.node_key.public_key))?;
writeln!(f, "🔑 Node Public Key: 0x{}", hex::encode(&self.node_key.public_key))?;
writeln!(
f,
"🔑 Ethereum public key: 0x{}",
"🔑 Ethereum Public Key: 0x{}",
hex::encode(&self.ethereum_key.public_key)
)?;
writeln!(f, "👤 Ethereum address: 0x{}", self.ethereum_address)?;
writeln!(f, "👤 Ethereum Address: 0x{:?}", self.ethereum_address)?;
dandanlen marked this conversation as resolved.
Show resolved Hide resolved
writeln!(
f,
"🔑 Validator public key: 0x{}",
"🔑 Validator Public Key: 0x{}",
hex::encode(&self.signing_key.public_key)
)?;
writeln!(f, "👤 Validator account id: {}", self.signing_account_id)?;
writeln!(f, "👤 Validator Account ID: {}", self.signing_account_id)?;
writeln!(f)?;
writeln!(f, "🌱 Seed phrase: {}", self.seed_phrase)?;
writeln!(f, "🌱 Seed Phrase: {}", self.seed_phrase)?;
Ok(())
}
}
Expand Down Expand Up @@ -356,7 +356,7 @@ fn generate_keys(json: bool, path: Option<PathBuf>, seed_phrase: Option<String>)
} else if !json {
println!();
println!("💡 You can save the private key files to a directory using the --path argument:");
println!("💡 `chainflip-cli --seed $MY_SEED_PHRASE --file $PATH_TO_KEYS_DIR`");
println!("💡 `chainflip-cli --seed-phrase $MY_SEED_PHRASE --path $PATH_TO_KEYS_DIR`");
}

Ok(())
Expand Down