tkivy: fix can_pay in invoice_dialog - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit e35bddcc09ccc9a5f761ccf3c4bce5cdab64f4c6 DIR parent a4944cdcb20415ae7ebbaef25f43c491627aab47 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 23 Oct 2019 08:33:16 +0200 kivy: fix can_pay in invoice_dialog Diffstat: M electrum/gui/kivy/uix/dialogs/invo… | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- DIR diff --git a/electrum/gui/kivy/uix/dialogs/invoice_dialog.py b/electrum/gui/kivy/uix/dialogs/invoice_dialog.py t@@ -21,6 +21,7 @@ Builder.load_string(''' data: '' status_color: 1,1,1,1 status_str:'' + can_pay: True shaded: False show_text: False AnchorLayout: t@@ -60,7 +61,7 @@ Builder.load_string(''' height: '48dp' text: _('Pay') on_release: root.do_pay() - disabled: not root.can_pay() + disabled: not root.can_pay ''') class InvoiceDialog(Factory.Popup): t@@ -73,13 +74,11 @@ class InvoiceDialog(Factory.Popup): self.data = data self.key = key - def can_pay(self): - return self.status == PR_UNPAID - def set_status(self, status): self.status = status self.status_str = pr_tooltips[status] self.status_color = pr_color[status] + self.can_pay = self.status == PR_UNPAID def on_dismiss(self): self.app.request_popup = None