Skip to content

Commit

Permalink
fix signature v value
Browse files Browse the repository at this point in the history
  • Loading branch information
JayT106 committed Jun 20, 2024
1 parent bf6b227 commit 714420c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/lib/eth_signer/src/g_kms_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl EthereumSigner for GKMSSigner {
.await
.map_err(|e| SignerError::SigningFailed(e.to_string()))?;

let adjust_v = signature.v + raw_tx.chain_id * 2 + 35;
let r_h256 = H256::from_slice(signature.r.as_byte_slice());
let s_h256 = H256::from_slice(signature.s.as_byte_slice());

Expand All @@ -128,7 +129,7 @@ impl EthereumSigner for GKMSSigner {
);

let web3_sig = Signature {
v: signature.v,
v: adjust_v,
r: r_h256,
s: s_h256,
};
Expand Down

0 comments on commit 714420c

Please sign in to comment.