Skip to content

Commit

Permalink
fix: deprecated marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol committed Jan 11, 2024
1 parent 7c166ba commit 15ad6cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func NewEthereumAddress(p ecdsa.PublicKey) ([]byte, error) {
if p.X == nil || p.Y == nil {
return nil, errors.New("invalid public key")
}
pubBytes := elliptic.Marshal(btcec.S256(), p.X, p.Y)
pubHash, err := LegacyKeccak256(pubBytes[1:])
pubBytes, _ := p.ECDH() // elliptic.Marshal(btcec.S256(), p.X, p.Y)
pubHash, err := LegacyKeccak256(pubBytes.Bytes()[1:])
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 15ad6cb

Please sign in to comment.