From f492021195206c2e3232f3ead60d69249ca01653 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 8 Dec 2017 21:21:54 +0100 Subject: [PATCH] fix: openalias resolution unnecessarily blocks gui for some payto --- gui/qt/main_window.py | 1 + gui/qt/paytoedit.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 2504c5887..b4a88f072 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -606,6 +606,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.need_update.clear() self.update_wallet() # resolve aliases + # FIXME this is a blocking network call that has a timeout of 5 sec self.payto_e.resolve() # update fee if self.require_fee_update: diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py index 83881e799..d13d80390 100644 --- a/gui/qt/paytoedit.py +++ b/gui/qt/paytoedit.py @@ -278,6 +278,9 @@ class PayToEdit(ScanQRTextEdit): self.previous_payto = key if not (('.' in key) and (not '<' in key) and (not ' ' in key)): return + parts = key.split(sep=',') # assuming single line + if parts and len(parts) > 0 and bitcoin.is_address(parts[0]): + return try: data = self.win.contacts.resolve(key) except: