Let wallet recovery use 64 byte hex strings and 24 word seeds.

1. Allow wallet recovery from 64 byte hex strings.
2. Allow use of 24 word legacy seeds created from 64 byte hex strings.
This commit is contained in:
K 2015-03-19 08:20:32 -07:00
parent fbc581a52e
commit 41127db32d
1 changed files with 2 additions and 2 deletions

View File

@ -163,11 +163,11 @@ def is_old_seed(seed):
try: try:
seed.decode('hex') seed.decode('hex')
is_hex = (len(seed) == 32) is_hex = (len(seed) == 32 or len(seed) == 64)
except Exception: except Exception:
is_hex = False is_hex = False
return is_hex or (uses_electrum_words and len(words) == 12) return is_hex or (uses_electrum_words and (len(words) == 12 or len(words) == 24))
# pywallet openssl private key implementation # pywallet openssl private key implementation