Skip to content

Commit

Permalink
debug: Detailed parse error.
Browse files Browse the repository at this point in the history
  • Loading branch information
koxu1996 committed Feb 6, 2024
1 parent 65c3eb3 commit d08f250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kairos-cli/bin/crypto/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ impl CasperPrivateKey {

pub fn from_file(file_path: &str) -> Result<Self, CryptoError> {
let secret_key = casper_types::SecretKey::from_file(file_path)
.map_err(|_e| CryptoError::FailedToParseKey {})?;
.map_err(|e| { println!("WHOOPS: {:?}", e); CryptoError::FailedToParseKey {}})?;
Ok(Self(secret_key))
}
}
3 changes: 2 additions & 1 deletion kairos-cli/bin/crypto/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ impl CasperSigner {

pub fn from_file(secret_key_path: &str) -> Result<Self, CryptoError> {
let secret_key =
SecretKey::from_file(secret_key_path).map_err(|_| CryptoError::FailedToParseKey {})?;
SecretKey::from_file(secret_key_path)
.map_err(|e| { println!("WHOOPS: {:?}", e); CryptoError::FailedToParseKey {}})?;

Ok(Self::from_key(CasperPrivateKey::from_key(secret_key)))
}
Expand Down

0 comments on commit d08f250

Please sign in to comment.