Skip to content

Commit

Permalink
Revert "accounts/keystore: handle error for invalid key in DecryptKey (
Browse files Browse the repository at this point in the history
…ethereum#27432)"

This reverts commit bfc46a4.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 67e0ca2 commit 71ede01
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions accounts/keystore/passphrase.go
Expand Up @@ -225,13 +225,10 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
if err != nil {
return nil, err
}
key, err := crypto.ToECDSA(keyBytes)
if err != nil {
return nil, fmt.Errorf("invalid key: %w", err)
}
key := crypto.ToECDSAUnsafe(keyBytes)
id, err := uuid.FromBytes(keyId)
if err != nil {
return nil, fmt.Errorf("invalid UUID: %w", err)
return nil, err
}
return &Key{
Id: id,
Expand Down

0 comments on commit 71ede01

Please sign in to comment.