aboutsummaryrefslogtreecommitdiffstats
path: root/ethcrypto
diff options
context:
space:
mode:
Diffstat (limited to 'ethcrypto')
-rw-r--r--ethcrypto/keyring.go6
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)
}