revert to previous restore method, without daemon
This commit is contained in:
parent
ca9eb50821
commit
142b5532ec
14
electrum
14
electrum
|
@ -147,7 +147,18 @@ def init_cmdline(config):
|
|||
wallet = Wallet.from_text(text, password, storage)
|
||||
except BaseException as e:
|
||||
sys.exit(str(e))
|
||||
wallet.synchronize()
|
||||
if not config.get('offline'):
|
||||
network = Network(config)
|
||||
network.start()
|
||||
wallet.start_threads(network)
|
||||
print_msg("Recovering wallet...")
|
||||
wallet.synchronize()
|
||||
wallet.restore(lambda x: x)
|
||||
msg = "Recovery successful" if wallet.is_found() else "Found no history for this wallet"
|
||||
else:
|
||||
msg = "This wallet was restored offline. It may contain more addresses than displayed."
|
||||
print_msg(msg)
|
||||
|
||||
else:
|
||||
password = password_dialog()
|
||||
wallet = Wallet(storage)
|
||||
|
@ -160,6 +171,7 @@ def init_cmdline(config):
|
|||
print_msg("Please keep it in a safe place; if you lose it, you will not be able to restore your wallet.")
|
||||
|
||||
print_msg("Wallet saved in '%s'" % wallet.storage.path)
|
||||
sys.exit(0)
|
||||
|
||||
else:
|
||||
if cmd.requires_wallet and not storage.file_exists:
|
||||
|
|
|
@ -101,7 +101,6 @@ class Commands:
|
|||
@command('')
|
||||
def create(self):
|
||||
"""Create a new wallet"""
|
||||
return True
|
||||
|
||||
@command('wn')
|
||||
def restore(self, text):
|
||||
|
@ -109,12 +108,6 @@ class Commands:
|
|||
public key, a master private key, a list of bitcoin addresses
|
||||
or bitcoin private keys. If you want to be prompted for your
|
||||
seed, type '?' or ':' (concealed) """
|
||||
self.wallet.restore(lambda x: x)
|
||||
if self.network:
|
||||
msg = "Recovery successful" if self.wallet.is_found() else "Found no history for this wallet"
|
||||
else:
|
||||
msg = "This wallet was restored offline. It may contain more addresses than displayed."
|
||||
return msg
|
||||
|
||||
@command('w')
|
||||
def deseed(self):
|
||||
|
|
Loading…
Reference in New Issue