mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
wallet restore: remove dead code. add log lines.
This commit is contained in:
parent
c25baf3dd7
commit
0137626a63
2 changed files with 5 additions and 25 deletions
|
@ -102,7 +102,6 @@ def wizard_dialog(func):
|
|||
class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||
|
||||
accept_signal = pyqtSignal()
|
||||
synchronized_signal = pyqtSignal(str)
|
||||
|
||||
def __init__(self, config, app, plugins, storage):
|
||||
BaseWizard.__init__(self, config, plugins, storage)
|
||||
|
@ -448,27 +447,6 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
self.exec_layout(playout.layout())
|
||||
return playout.encrypt_cb.isChecked()
|
||||
|
||||
def show_restore(self, wallet, network):
|
||||
# FIXME: these messages are shown after the install wizard is
|
||||
# finished and the window closed. On macOS they appear parented
|
||||
# with a re-appeared ghost install wizard window...
|
||||
if network:
|
||||
def task():
|
||||
wallet.wait_until_synchronized()
|
||||
if wallet.is_found():
|
||||
msg = _("Recovery successful")
|
||||
else:
|
||||
msg = _("No transactions found for this seed")
|
||||
self.synchronized_signal.emit(msg)
|
||||
self.synchronized_signal.connect(self.show_message)
|
||||
t = threading.Thread(target = task)
|
||||
t.daemon = True
|
||||
t.start()
|
||||
else:
|
||||
msg = _("This wallet was restored offline. It may "
|
||||
"contain more addresses than displayed.")
|
||||
self.show_message(msg)
|
||||
|
||||
@wizard_dialog
|
||||
def confirm_dialog(self, title, message, run_next):
|
||||
self.confirm(message, title)
|
||||
|
|
|
@ -643,22 +643,24 @@ class Abstract_Wallet(AddressSynchronizer):
|
|||
self.set_up_to_date(False)
|
||||
while not self.is_up_to_date():
|
||||
if callback:
|
||||
msg = "%s\n%s %d"%(
|
||||
msg = "{}\n{} {}".format(
|
||||
_("Please wait..."),
|
||||
_("Addresses generated:"),
|
||||
len(self.addresses(True)))
|
||||
len(self.get_addresses()))
|
||||
callback(msg)
|
||||
time.sleep(0.1)
|
||||
def wait_for_network():
|
||||
while not self.network.is_connected():
|
||||
if callback:
|
||||
msg = "%s \n" % (_("Connecting..."))
|
||||
msg = "{} \n".format(_("Connecting..."))
|
||||
callback(msg)
|
||||
time.sleep(0.1)
|
||||
# wait until we are connected, because the user
|
||||
# might have selected another server
|
||||
if self.network:
|
||||
self.print_error("waiting for network...")
|
||||
wait_for_network()
|
||||
self.print_error("waiting while wallet is syncing...")
|
||||
wait_for_wallet()
|
||||
else:
|
||||
self.synchronize()
|
||||
|
|
Loading…
Add table
Reference in a new issue