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 | |
parent | 3889785017a1381d215cb1dc47fd5fb5b38add79 (diff) | |
download | go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar.gz go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar.bz2 go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar.lz go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar.xz go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.tar.zst go-tangerine-6151ae7db5251436e9ece190eb3569d4aa882671.zip |
Fixed key import for empty entries
-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) } |