trestore get_master_public_key function. fixes #668 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0ba73dfc95a6dc8f10da11a6b89f3514dae8090a DIR parent 5d68ce4f226985146f713cbde864ff6da7cf024b HTML Author: ThomasV <thomasv@gitorious> Date: Tue, 29 Apr 2014 12:26:58 +0200 restore get_master_public_key function. fixes #668 Diffstat: M lib/commands.py | 2 +- M lib/wallet.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -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) DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -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(): t@@ -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")