Reopenning fix for keystore field name change to align with EIP2335 (#12530)

* adding changes

* fixing deepsource
This commit is contained in:
james-prysm
2023-06-14 15:48:30 -05:00
committed by GitHub
parent 3e17dbb532
commit d15122fae2
12 changed files with 95 additions and 58 deletions

View File

@@ -197,11 +197,11 @@ func encrypt(cliCtx *cli.Context) error {
return errors.Wrap(err, "could not encrypt into new keystore")
}
item := &keymanager.Keystore{
Crypto: cryptoFields,
ID: id.String(),
Version: encryptor.Version(),
Pubkey: pubKey,
Name: encryptor.Name(),
Crypto: cryptoFields,
ID: id.String(),
Version: encryptor.Version(),
Pubkey: pubKey,
Description: encryptor.Name(),
}
encodedFile, err := json.MarshalIndent(item, "", "\t")
if err != nil {
@@ -229,7 +229,6 @@ func readAndDecryptKeystore(fullPath, password string) error {
}
decryptor := keystorev4.New()
keystoreFile := &keymanager.Keystore{}
if err := json.Unmarshal(f, keystoreFile); err != nil {
return errors.Wrap(err, "could not JSON unmarshal keystore file")
}