fix(signers): aws eip712 does not use eip155 (#1309)
* fix(signers): aws eip712 does not use eip155 * chore: update changelog * chore: lints Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
parent
799660bd26
commit
4d9916570f
|
@ -4,6 +4,7 @@
|
|||
|
||||
### Unreleased
|
||||
|
||||
- AWS EIP712 data signing no longer signs with EIP155
|
||||
- Added Cronos testnet to etherscan options [1276](https://github.com/gakonst/ethers-rs/pull/1276)
|
||||
- Fix parsing of a pending block
|
||||
[1272](https://github.com/gakonst/ethers-rs/pull/1272)
|
||||
|
|
|
@ -251,11 +251,14 @@ impl<'a> super::Signer for AwsSigner<'a> {
|
|||
&self,
|
||||
payload: &T,
|
||||
) -> Result<EthSig, Self::Error> {
|
||||
let hash = payload.encode_eip712().map_err(|e| Self::Error::Eip712Error(e.to_string()))?;
|
||||
let digest =
|
||||
payload.encode_eip712().map_err(|e| Self::Error::Eip712Error(e.to_string()))?;
|
||||
|
||||
let digest = self.sign_digest_with_eip155(hash.into(), self.chain_id).await?;
|
||||
let sig = self.sign_digest(digest).await?;
|
||||
let sig = utils::rsig_from_digest_bytes_trial_recovery(&sig, digest, &self.pubkey);
|
||||
let sig = rsig_to_ethsig(&sig);
|
||||
|
||||
Ok(digest)
|
||||
Ok(sig)
|
||||
}
|
||||
|
||||
fn address(&self) -> Address {
|
||||
|
|
Loading…
Reference in New Issue