tfix #4497 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f7c8e5a33b114bd8eebbfa575d819042f6dce747 DIR parent 92e510f8aa31ebf75a3b55fae28c62db8cef6d19 HTML Author: SomberNight <somber.night@protonmail.com> Date: Wed, 4 Jul 2018 16:04:04 +0200 fix #4497 Diffstat: M gui/kivy/main_window.py | 3 +++ M gui/kivy/uix/screens.py | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) --- DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -288,6 +288,9 @@ class ElectrumWindow(App): return os.path.basename(self.wallet.storage.path) if self.wallet else ' ' def on_pr(self, pr): + if not self.wallet: + self.show_error(_('No wallet loaded.')) + return if pr.verify(self.wallet.contacts): key = self.wallet.invoices.add(pr) if self.invoices_screen: DIR diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py t@@ -166,8 +166,12 @@ class SendScreen(CScreen): kvname = 'send' payment_request = None + payment_request_queued = None def set_URI(self, text): + if not self.app.wallet: + self.payment_request_queued = text + return import electrum try: uri = electrum.util.parse_URI(text, self.app.on_pr) t@@ -182,7 +186,9 @@ class SendScreen(CScreen): self.screen.is_pr = False def update(self): - pass + if self.app.wallet and self.payment_request_queued: + self.set_URI(self.payment_request_queued) + self.payment_request_queued = None def do_clear(self): self.screen.amount = ''