diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index a2e0ba2e468..6cc09a7ec45 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -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 }