Skip to content

Commit 90c7f96

Browse files
authored
fix(common): avoid panic on invalid calldata selector by propagating parse error (#11888)
1 parent 7419075 commit 90c7f96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/common/src/selectors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl OpenChainClient {
217217
)
218218
}
219219

220-
let mut sigs = self.decode_function_selector(calldata[..8].parse().unwrap()).await?;
220+
let mut sigs = self.decode_function_selector(calldata[..8].parse()?).await?;
221221
// Retain only signatures that can be decoded.
222222
sigs.retain(|sig| abi_decode_calldata(sig, calldata, true, true).is_ok());
223223
Ok(sigs)

0 commit comments

Comments
 (0)