@@ -38,7 +38,7 @@ func generateKeyCmd() *cobra.Command {
38
38
pubKeyBts := pubKey .Bytes ()
39
39
40
40
pubKeyHex := hex .EncodeToString (pubKeyBts )
41
- address , err := auth.EthSecp256k1Authenticator {}.Identifier (pubKeyBts )
41
+ address , err := auth.EthSecp256k1Authenticator {}.Identifier (crypto . EthereumAddressFromPubKey ( pubKey .( * crypto. Secp256k1PublicKey )) )
42
42
if err != nil {
43
43
return display .PrintErr (cmd , err )
44
44
}
@@ -89,7 +89,7 @@ func (p *privateKeyFileRes) MarshalText() (text []byte, err error) {
89
89
bts = append (bts , p .PrivateKeyPath ... )
90
90
bts = append (bts , []byte ("\n Public key: " )... )
91
91
bts = append (bts , p .PublicKey ... )
92
- bts = append (bts , []byte ("\n Address: " )... )
92
+ bts = append (bts , []byte ("\n Address: " )... )
93
93
bts = append (bts , p .Address ... )
94
94
return bts , nil
95
95
}
@@ -108,9 +108,9 @@ func (p *privateKeyRes) MarshalJSON() ([]byte, error) {
108
108
func (p * privateKeyRes ) MarshalText () (text []byte , err error ) {
109
109
bts := []byte ("Private key: " )
110
110
bts = append (bts , p .PrivateKey ... )
111
- bts = append (bts , []byte ("\n Public key: " )... )
111
+ bts = append (bts , []byte ("\n Public key: " )... )
112
112
bts = append (bts , p .PublicKey ... )
113
- bts = append (bts , []byte ("\n Address: " )... )
113
+ bts = append (bts , []byte ("\n Address: " )... )
114
114
bts = append (bts , p .Address ... )
115
115
return bts , nil
116
116
}
0 commit comments