electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit f7c8e5a33b114bd8eebbfa575d819042f6dce747
parent 92e510f8aa31ebf75a3b55fae28c62db8cef6d19
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed,  4 Jul 2018 16:04:04 +0200

fix #4497

Diffstat:
Mgui/kivy/main_window.py | 3+++
Mgui/kivy/uix/screens.py | 8+++++++-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -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: diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -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) @@ -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 = ''