Skip to content

Commit ce047e6

Browse files
committed
Fixes accordingly to the review
1 parent d310ba7 commit ce047e6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

cmd/operatorcli/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ var commandEncrypt = &cli.Command{
1919
flag.PassphraseFlag,
2020
flag.BlsPassphraseFlag,
2121
flag.EcdsaPassphraseFlag,
22-
flag.EcdsaAliasedPassphraseFlag,
2322
flag.KeyStorePathFlag,
2423
},
2524
}
@@ -98,7 +97,7 @@ var commandGenerateAlias = &cli.Command{
9897
Action: runGenerateAlias,
9998
Flags: []cli.Flag{
10099
flag.EcdsaPrivateKeyFlag,
101-
flag.PassphraseFlag,
100+
flag.EcdsaAliasedPassphraseFlag,
102101
flag.KeyStorePathFlag,
103102
flag.OverrideFlag,
104103
},

internal/operatorcli/operator_cli.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func RunRegister(c *cli.Context) error {
158158

159159
if blsPassphrase == "" || ecdsaPassphrase == "" || keyStorePath == "" {
160160
if c.String(flag.EcdsaPrivateKeyFlag.Name) == "" || c.String(flag.BlsPrivateKeyFlag.Name) == "" {
161-
return cli.Exit("either ecdsa/bls passphrase and keystore-path or ecdsa-private-key and bls-private-key are required", 1)
161+
return cli.Exit("either general/ecdsa/bls passphrase and keystore-path or ecdsa-private-key and bls-private-key are required", 1)
162162
}
163163
ecdsaPair, err = crypto.HexToECDSA(c.String(flag.EcdsaPrivateKeyFlag.Name))
164164
if err != nil {
@@ -489,7 +489,7 @@ func RunGenerateBLSKey(c *cli.Context) error {
489489
}
490490

491491
func RunGenerateAlias(c *cli.Context) error {
492-
passphrase := c.String(flag.PassphraseFlag.Name)
492+
ecdsaAliasedPassphrase := c.String(flag.EcdsaAliasedPassphraseFlag.Name)
493493
if passphrase == "" {
494494
return cli.Exit("passphrase is required", 1)
495495
}
@@ -512,7 +512,7 @@ func RunGenerateAlias(c *cli.Context) error {
512512

513513
var err error
514514
var aliasEcdsaPair *ecdsa.PrivateKey
515-
aliasEcdsaPair, err = eigensdkecdsa.ReadKey(filepath.Join(keyStorePath, "ecdsaAliasedEncryptedWallet.json"), passphrase)
515+
aliasEcdsaPair, err = eigensdkecdsa.ReadKey(filepath.Join(keyStorePath, "ecdsaAliasedEncryptedWallet.json"), ecdsaAliasedPassphrase)
516516
if err != nil {
517517
// there was an error reading the alias key (either the file doesn't exist or it is corrupted), consider as if the alias doesn't exist
518518
if c.String(flag.EcdsaPrivateKeyFlag.Name) != "" {
@@ -543,7 +543,7 @@ func RunGenerateAlias(c *cli.Context) error {
543543
}
544544

545545
// Save the private key to a file
546-
if err = eigensdkecdsa.WriteKey(filepath.Join(keyStorePath, "ecdsaAliasedEncryptedWallet.json"), aliasEcdsaPair, passphrase); err != nil {
546+
if err = eigensdkecdsa.WriteKey(filepath.Join(keyStorePath, "ecdsaAliasedEncryptedWallet.json"), aliasEcdsaPair, ecdsaAliasedPassphrase); err != nil {
547547
return cli.Exit(fmt.Sprintf("Error writing the ecdsaAliasedEncryptedWallet.json file %v", err), 1)
548548
}
549549

0 commit comments

Comments
 (0)