Skip to content

Commit

Permalink
remove secp var
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Nov 1, 2024
1 parent f774e7b commit 86a9439
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/precompile/src/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ mod secp256k1 {
let recid = RecoveryId::from_i32(recid as i32).expect("recovery ID is valid");
let sig = RecoverableSignature::from_compact(sig.as_slice(), recid)?;

let secp = &SECP256K1;
let msg = Message::from_digest(msg.0);
let public = secp.recover_ecdsa(&msg, &sig)?;
let public = SECP256K1.recover_ecdsa(&msg, &sig)?;

let mut hash = keccak256(&public.serialize_uncompressed()[1..]);
hash[..12].fill(0);
Expand Down

0 comments on commit 86a9439

Please sign in to comment.