aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/presale.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/keystore/presale.go')
-rw-r--r--accounts/keystore/presale.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go
index 5b883c45f..2f18a64db 100644
--- a/accounts/keystore/presale.go
+++ b/accounts/keystore/presale.go
@@ -74,7 +74,10 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
return nil, err
}
ethPriv := crypto.Keccak256(plainText)
- ecKey := crypto.ToECDSA(ethPriv)
+ ecKey, err := crypto.ToECDSA(ethPriv)
+ if err != nil {
+ return nil, err
+ }
key = &Key{
Id: nil,
Address: crypto.PubkeyToAddress(ecKey.PublicKey),