Skip to content

Commit 8156e38

Browse files
authored
fix(crypto): invalid type of PubKey.Address() method (#600)
1 parent 0afdc34 commit 8156e38

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crypto/ethsecp256k1/ethsecp256k1.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88

99
"github.com/ethereum/go-ethereum/crypto"
1010

11-
tmcrypto "github.com/cometbft/cometbft/crypto"
12-
1311
"github.com/cosmos/evm/ethereum/eip712"
1412

1513
errorsmod "cosmossdk.io/errors"
@@ -147,13 +145,13 @@ var (
147145

148146
// Address returns the address of the ECDSA public key.
149147
// The function will return an empty address if the public key is invalid.
150-
func (pubKey PubKey) Address() tmcrypto.Address {
148+
func (pubKey PubKey) Address() cryptotypes.Address {
151149
pubk, err := crypto.DecompressPubkey(pubKey.Key)
152150
if err != nil {
153151
return nil
154152
}
155153

156-
return tmcrypto.Address(crypto.PubkeyToAddress(*pubk).Bytes())
154+
return cryptotypes.Address(crypto.PubkeyToAddress(*pubk).Bytes())
157155
}
158156

159157
// Bytes returns the raw bytes of the ECDSA public key.

0 commit comments

Comments
 (0)