From 41127db32dc206781b439d956e39fd889a6cf068 Mon Sep 17 00:00:00 2001 From: K Date: Thu, 19 Mar 2015 08:20:32 -0700 Subject: [PATCH] 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. --- lib/bitcoin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 0dcc3dff..28d07e60 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -163,11 +163,11 @@ def is_old_seed(seed): try: seed.decode('hex') - is_hex = (len(seed) == 32) + is_hex = (len(seed) == 32 or len(seed) == 64) except Exception: 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