diff options
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/keystore/keystore_passphrase.go | 6 | ||||
-rw-r--r-- | accounts/keystore/presale.go | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/accounts/keystore/keystore_passphrase.go b/accounts/keystore/keystore_passphrase.go index 9a5c452c1..679fc15d6 100644 --- a/accounts/keystore/keystore_passphrase.go +++ b/accounts/keystore/keystore_passphrase.go @@ -182,10 +182,8 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) { if err != nil { return nil, err } - key, err := crypto.ToECDSA(keyBytes) - if err != nil { - return nil, err - } + key := crypto.ToECDSAUnsafe(keyBytes) + return &Key{ Id: uuid.UUID(keyId), Address: crypto.PubkeyToAddress(key.PublicKey), diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go index 2f18a64db..ed900ad08 100644 --- a/accounts/keystore/presale.go +++ b/accounts/keystore/presale.go @@ -74,10 +74,8 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error return nil, err } ethPriv := crypto.Keccak256(plainText) - ecKey, err := crypto.ToECDSA(ethPriv) - if err != nil { - return nil, err - } + ecKey := crypto.ToECDSAUnsafe(ethPriv) + key = &Key{ Id: nil, Address: crypto.PubkeyToAddress(ecKey.PublicKey), |