Skip to content

Commit

Permalink
fix: cargo checks
Browse files Browse the repository at this point in the history
  • Loading branch information
borispovod committed Nov 24, 2023
1 parent 0104da9 commit 5800e79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/magi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ impl TryFrom<Cli> for CliConfig {
/// The incoming value is the path to the key or a string with the key.
/// The private key must be in hexadecimal format with a length of 64 characters.
fn parse_secret_key_from_cli(value: &str) -> Result<SecretKey> {
secret_key_from_hex(value).or_else(|err| {
let path = PathBuf::try_from(value).map_err(|_| err)?;
secret_key_from_hex(value).or_else(|_| {
let path = PathBuf::from(value);
let key_string = fs::read_to_string(&path)
.map_err(|_| anyhow!("The key file {path:?} was not found."))?
.trim()
Expand Down
2 changes: 1 addition & 1 deletion src/types/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl TryFrom<&ExecutionPayload> for HeadInfo {
fn try_from(payload: &ExecutionPayload) -> Result<Self> {
let (epoch, seq_number) = payload
.transactions
.get(0)
.first()
.ok_or(eyre::eyre!("no deposit transaction"))?
.derive_unsafe_epoch()?;

Expand Down

0 comments on commit 5800e79

Please sign in to comment.