explicit type for imported wallets. fixes #698
authorThomasV <thomasv@gitorious>
Wed, 21 May 2014 14:04:58 +0000 (16:04 +0200)
committerThomasV <thomasv@gitorious>
Wed, 21 May 2014 14:04:58 +0000 (16:04 +0200)
lib/wallet.py

index 48cbaae..e08a2fc 100644 (file)
@@ -1086,6 +1086,7 @@ class Imported_Wallet(Abstract_Wallet):
         a = self.accounts.get(IMPORTED_ACCOUNT)
         if not a:
             self.accounts[IMPORTED_ACCOUNT] = ImportedAccount({'imported':{}})
+        self.storage.put('wallet_type', 'imported', True)
 
 
     def is_watching_only(self):
@@ -1634,8 +1635,7 @@ class Wallet(object):
         if storage.get('wallet_type') == '2of3':
             return Wallet_2of3(storage)
 
-        if storage.file_exists and not storage.get('seed'):
-            # wallet made of imported keys
+        if storage.get('wallet_type') == 'imported':
             return Imported_Wallet(storage)