Skip to content

Commit

Permalink
Revert "remove eip-155 considerations from arbitrary data signing (#1634
Browse files Browse the repository at this point in the history
) (#1661)"

This reverts commit b9e074e.
  • Loading branch information
trajan0x authored Dec 14, 2023
1 parent b9e074e commit bd54b02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ethergo/signer/signer/localsigner/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func decodeSignature(sig []byte) signer.Signature {
if len(sig) != crypto.SignatureLength {
panic(fmt.Sprintf("wrong size for signature: got %d, want %d", len(sig), crypto.SignatureLength))
}
v := new(big.Int).SetBytes([]byte{sig[64]})
v := new(big.Int).SetBytes([]byte{sig[64] + 27})
r := new(big.Int).SetBytes(sig[:32])
s := new(big.Int).SetBytes(sig[32:64])

Expand Down
2 changes: 1 addition & 1 deletion ethergo/signer/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func DecodeSignature(sig []byte) Signature {
}
r := new(big.Int).SetBytes(sig[:32])
s := new(big.Int).SetBytes(sig[32:64])
v := new(big.Int).SetBytes([]byte{sig[64]})
v := new(big.Int).SetBytes([]byte{sig[64] + 27})
return NewSignature(v, r, s)
}

Expand Down

0 comments on commit bd54b02

Please sign in to comment.