correctly handle bitcoin URIs if GUI is already running

see #4796
This commit is contained in:
SomberNight 2018-10-25 00:18:14 +02:00
parent 0e6160bf2d
commit 361ffc0620
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 4 additions and 3 deletions

View file

@ -221,6 +221,7 @@ class Daemon(DaemonThread):
config = SimpleConfig(config_options)
if self.gui:
if hasattr(self.gui, 'new_window'):
config.open_last_wallet()
path = config.get_wallet_path()
self.gui.new_window(path, config.get('url'))
response = "ok"

View file

@ -237,9 +237,9 @@ class ElectrumGui(PrintError):
try:
for w in self.windows:
if w.wallet.storage.path == wallet.storage.path:
w.bring_to_top()
return
w = self.create_window_for_wallet(wallet)
break
else:
w = self.create_window_for_wallet(wallet)
except BaseException as e:
traceback.print_exc(file=sys.stdout)
d = QMessageBox(QMessageBox.Warning, _('Error'),