diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-02 02:08:32 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-02 02:08:32 +0800 |
commit | 6151ae7db5251436e9ece190eb3569d4aa882671 (patch) | |
tree | 6f6cabb52394697740d76564d40aed441093dfb2 /ethcrypto | |
parent | 3889785017a1381d215cb1dc47fd5fb5b38add79 (diff) | |
download | dexon-6151ae7db5251436e9ece190eb3569d4aa882671.tar.gz dexon-6151ae7db5251436e9ece190eb3569d4aa882671.tar.zst dexon-6151ae7db5251436e9ece190eb3569d4aa882671.zip |
Fixed key import for empty entries
Diffstat (limited to 'ethcrypto')
-rw-r--r-- | ethcrypto/keyring.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ethcrypto/keyring.go b/ethcrypto/keyring.go index 277fa2134..d3399d13d 100644 --- a/ethcrypto/keyring.go +++ b/ethcrypto/keyring.go @@ -74,8 +74,12 @@ func NewKeyRingFromString(content string) (*KeyRing, error) { } else if len(words) != 1 { return nil, fmt.Errorf("Unrecognised key format") } - secrets = append(secrets, ethutil.Hex2Bytes(secret)) + + if len(secret) != 0 { + secrets = append(secrets, ethutil.Hex2Bytes(secret)) + } } + return NewKeyRingFromSecrets(secrets) } |