Skip to content

Commit

Permalink
fix(cast): return logs in all cases (#7731)
Browse files Browse the repository at this point in the history
* return logs in all cases

* make clippy happy

* nits
  • Loading branch information
kamuik16 authored Apr 19, 2024
1 parent b18c149 commit 844caa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/cast/bin/cmd/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ impl LogsArgs {
None => None,
};

let from_block = cast.convert_block_number(from_block).await?;
let to_block = cast.convert_block_number(to_block).await?;
let from_block =
cast.convert_block_number(Some(from_block.unwrap_or_else(BlockId::earliest))).await?;
let to_block =
cast.convert_block_number(Some(to_block.unwrap_or_else(BlockId::latest))).await?;

let filter = build_filter(from_block, to_block, address, sig_or_topic, topics_or_args)?;

Expand Down

0 comments on commit 844caa8

Please sign in to comment.