Skip to content

Commit

Permalink
fix: l2 to l1 message should be searched by hash only (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
montekki authored Sep 22, 2023
1 parent c069c50 commit eae85c1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,7 @@ impl<P: JsonRpcClient> ZksyncMiddleware for Provider<P> {
let l2_to_l1_log_index = receipt
.l2_to_l1_logs
.iter()
.enumerate()
.filter(|(_, log)| log.value == l2_to_l1_message_hash)
.nth(index)
.map(|(i, _)| i)
.position(|l| l.value == l2_to_l1_message_hash)
.ok_or(Error::L2ToL1WithValueNotFound(
withdrawal_hash,
l2_to_l1_message_hash,
Expand Down

0 comments on commit eae85c1

Please sign in to comment.