electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0ba73dfc95a6dc8f10da11a6b89f3514dae8090a
parent 5d68ce4f226985146f713cbde864ff6da7cf024b
Author: ThomasV <thomasv@gitorious>
Date:   Tue, 29 Apr 2014 12:26:58 +0200

restore get_master_public_key function. fixes #668

Diffstat:
Mlib/commands.py | 2+-
Mlib/wallet.py | 9+++++++--
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/commands.py b/lib/commands.py @@ -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) diff --git a/lib/wallet.py b/lib/wallet.py @@ -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")