aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/keystore_passphrase.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/keystore/keystore_passphrase.go')
-rw-r--r--accounts/keystore/keystore_passphrase.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/accounts/keystore/keystore_passphrase.go b/accounts/keystore/keystore_passphrase.go
index 2eae25841..9a5c452c1 100644
--- a/accounts/keystore/keystore_passphrase.go
+++ b/accounts/keystore/keystore_passphrase.go
@@ -182,7 +182,10 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
if err != nil {
return nil, err
}
- key := crypto.ToECDSA(keyBytes)
+ key, err := crypto.ToECDSA(keyBytes)
+ if err != nil {
+ return nil, err
+ }
return &Key{
Id: uuid.UUID(keyId),
Address: crypto.PubkeyToAddress(key.PublicKey),