chore(clippy): make clippy happy (#2264)
* chore(clippy): make clippy happy * chore: silence clippy fp --------- Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
parent
72be3376e2
commit
304fe0988d
|
@ -360,6 +360,7 @@ where
|
||||||
type IntoFuture = Pin<Box<dyn Future<Output = Self::Output> + Send>>;
|
type IntoFuture = Pin<Box<dyn Future<Output = Self::Output> + Send>>;
|
||||||
|
|
||||||
fn into_future(self) -> Self::IntoFuture {
|
fn into_future(self) -> Self::IntoFuture {
|
||||||
|
#[allow(clippy::redundant_async_block)]
|
||||||
Box::pin(async move { self.call().await })
|
Box::pin(async move { self.call().await })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ impl super::Signer for AwsSigner {
|
||||||
payload.encode_eip712().map_err(|e| Self::Error::Eip712Error(e.to_string()))?;
|
payload.encode_eip712().map_err(|e| Self::Error::Eip712Error(e.to_string()))?;
|
||||||
|
|
||||||
let sig = self.sign_digest(digest).await?;
|
let sig = self.sign_digest(digest).await?;
|
||||||
let sig = utils::sig_from_digest_bytes_trial_recovery(&sig, digest.into(), &self.pubkey);
|
let sig = utils::sig_from_digest_bytes_trial_recovery(&sig, digest, &self.pubkey);
|
||||||
|
|
||||||
Ok(sig)
|
Ok(sig)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ pub(super) fn sig_from_digest_bytes_trial_recovery(
|
||||||
let r = U256::from_big_endian(r_bytes.as_slice());
|
let r = U256::from_big_endian(r_bytes.as_slice());
|
||||||
let s = U256::from_big_endian(s_bytes.as_slice());
|
let s = U256::from_big_endian(s_bytes.as_slice());
|
||||||
|
|
||||||
if check_candidate(&sig, RecoveryId::from_byte(0).unwrap(), digest, vk) {
|
if check_candidate(sig, RecoveryId::from_byte(0).unwrap(), digest, vk) {
|
||||||
EthSig { r, s, v: 0 }
|
EthSig { r, s, v: 0 }
|
||||||
} else if check_candidate(&sig, RecoveryId::from_byte(1).unwrap(), digest, vk) {
|
} else if check_candidate(sig, RecoveryId::from_byte(1).unwrap(), digest, vk) {
|
||||||
EthSig { r, s, v: 1 }
|
EthSig { r, s, v: 1 }
|
||||||
} else {
|
} else {
|
||||||
panic!("bad sig");
|
panic!("bad sig");
|
||||||
|
|
Loading…
Reference in New Issue