guess seed_version on old wallets
authorThomasV <thomasv@gitorious>
Thu, 13 Mar 2014 09:42:39 +0000 (10:42 +0100)
committerThomasV <thomasv@gitorious>
Thu, 13 Mar 2014 09:42:39 +0000 (10:42 +0100)
lib/wallet.py

index fa0bc6a..a052b39 100644 (file)
@@ -1813,6 +1813,8 @@ class Wallet(object):
             seed_version = NEW_SEED_VERSION if config.get('bip32') is True else OLD_SEED_VERSION
         else:
             seed_version = storage.get('seed_version')
+            if not seed_version:
+                seed_version = OLD_SEED_VERSION if len(storage.get('master_public_key')) == 128 else NEW_SEED_VERSION
 
         if seed_version == OLD_SEED_VERSION:
             return OldWallet(storage)