From d08f2500aab6ab9f659e221d8063ce5125826beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Bro=C5=84ski?= Date: Tue, 6 Feb 2024 22:22:08 +0100 Subject: [PATCH] debug: Detailed parse error. --- kairos-cli/bin/crypto/private_key.rs | 2 +- kairos-cli/bin/crypto/signer.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kairos-cli/bin/crypto/private_key.rs b/kairos-cli/bin/crypto/private_key.rs index 7ed7a911..171093cf 100644 --- a/kairos-cli/bin/crypto/private_key.rs +++ b/kairos-cli/bin/crypto/private_key.rs @@ -9,7 +9,7 @@ impl CasperPrivateKey { pub fn from_file(file_path: &str) -> Result { 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)) } } diff --git a/kairos-cli/bin/crypto/signer.rs b/kairos-cli/bin/crypto/signer.rs index 065cd14b..3296db46 100644 --- a/kairos-cli/bin/crypto/signer.rs +++ b/kairos-cli/bin/crypto/signer.rs @@ -24,7 +24,8 @@ impl CasperSigner { pub fn from_file(secret_key_path: &str) -> Result { 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))) }