restore get_master_public_key function. fixes #668
authorThomasV <thomasv@gitorious>
Tue, 29 Apr 2014 10:26:58 +0000 (12:26 +0200)
committerThomasV <thomasv@gitorious>
Tue, 29 Apr 2014 10:26:58 +0000 (12:26 +0200)
lib/commands.py
lib/wallet.py

index 801a3c6..88b6a2f 100644 (file)
@@ -248,7 +248,7 @@ class Commands:
         return electrum.ELECTRUM_VERSION
  
     def getmpk(self):
-        return self.wallet.get_master_public_keys()
+        return self.wallet.get_master_public_key()
 
     def getseed(self):
         mnemonic = self.wallet.get_mnemonic(self.password)
index 46482ea..9f89c94 100644 (file)
@@ -515,6 +515,9 @@ class NewWallet:
         if s is None: return False
         return s[0] == 1
 
+    def get_master_public_key(self):
+        return self.master_public_keys["m/"]
+
     def get_master_public_keys(self):
         out = {}
         for k, account in self.accounts.items():
@@ -1745,9 +1748,11 @@ class OldWallet(NewWallet):
         mpk = OldAccount.mpk_from_seed(seed)
         self.storage.put('master_public_key', mpk, True)
 
+    def get_master_public_key(self):
+        return self.storage.get("master_public_key")
+
     def get_master_public_keys(self):
-        mpk = self.storage.get("master_public_key")
-        return {'Main Account':mpk}
+        return {'Main Account':self.get_master_public_key()}
 
     def create_accounts(self, password):
         mpk = self.storage.get("master_public_key")