fix load_accounts
authorThomasV <thomasv@gitorious>
Tue, 1 Apr 2014 17:10:59 +0000 (19:10 +0200)
committerThomasV <thomasv@gitorious>
Tue, 1 Apr 2014 17:10:59 +0000 (19:10 +0200)
lib/wallet.py

index b5b5216..e358bd1 100644 (file)
@@ -449,10 +449,14 @@ class NewWallet:
             if k == 0:
                 v['mpk'] = self.storage.get('master_public_key')
                 self.accounts[k] = OldAccount(v)
-            elif '&' in k:
+            elif v.get('xpub3'):
+                self.accounts[k] = BIP32_Account_2of3(v)
+            elif v.get('xpub2'):
                 self.accounts[k] = BIP32_Account_2of2(v)
-            else:
+            elif v.get('xpub'):
                 self.accounts[k] = BIP32_Account(v)
+            else:
+                raise
 
         self.pending_accounts = self.storage.get('pending_accounts',{})