1
0

fix restore from mpk command line

This commit is contained in:
ThomasV
2014-09-08 05:17:56 +02:00
parent ea9e468333
commit bd6f21232d
2 changed files with 8 additions and 6 deletions

View File

@@ -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...")