electrum

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

commit bd6f21232d7e627dec295fc27f1a4fa00c1c141a
parent ea9e468333e97cdec7a2b6f4268430f5706d8ca9
Author: ThomasV <thomasv@gitorious>
Date:   Mon,  8 Sep 2014 05:17:56 +0200

fix restore from mpk command line

Diffstat:
Melectrum | 8++++++--
Mlib/wallet.py | 6++----
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/electrum b/electrum @@ -283,7 +283,10 @@ if __name__ == '__main__': if cmd.name == 'restore': if options.mpk: - wallet = Wallet.from_mpk(options.mpk, storage) + if Wallet.is_old_mpk(options.mpk): + wallet = Wallet.from_old_mpk(options.mpk, storage) + if Wallet.is_xpub(options.mpk): + wallet = Wallet.from_xpub(options.mpk, storage) else: import getpass seed = getpass.getpass(prompt="seed:", stream=None) if options.concealed else raw_input("seed:") @@ -295,7 +298,8 @@ if __name__ == '__main__': wallet.create_main_account(password) if not options.offline: - network = Network(config) + s = get_daemon(config, True) + network = NetworkProxy(s,config) network.start() wallet.start_threads(network) print_msg("Recovering wallet...") diff --git a/lib/wallet.py b/lib/wallet.py @@ -1191,12 +1191,10 @@ class Deterministic_Wallet(Abstract_Wallet): def wait_for_wallet(): self.set_up_to_date(False) while not self.is_up_to_date(): - msg = "%s\n%s %d\n%s %.1f"%( + msg = "%s\n%s %d"%( _("Please wait..."), _("Addresses generated:"), - len(self.addresses(True)), - _("Kilobytes received:"), - self.network.interface.bytes_received/1024.) + len(self.addresses(True))) apply(callback, (msg,)) time.sleep(0.1)