From 3df13b8ce46a6f7d2301fb7249b9826303d94fa0 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 26 Jun 2023 17:32:02 +0200 Subject: [PATCH] qt: disallow save of LNURLp/LnAddr --- electrum/gui/qt/send_tab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qt/send_tab.py b/electrum/gui/qt/send_tab.py index f20b4d871..5cdf4592d 100644 --- a/electrum/gui/qt/send_tab.py +++ b/electrum/gui/qt/send_tab.py @@ -406,7 +406,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger): self.comment_e.setToolTip(_('Max comment length: %d characters') % fields.comment) self.set_field_validated(self.payto_e, validated=fields.validated) - # LNURLp amount range and comment tooltip + # LNURLp amount range if pi.type in [PaymentIdentifierType.LNURLP, PaymentIdentifierType.LNADDR] \ and pi.state == PaymentIdentifierState.LNURLP_FINALIZE \ and pi.lnurl_data.min_sendable_sat != pi.lnurl_data.max_sendable_sat: @@ -416,7 +416,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger): self.amount_e.setToolTip('') self.send_button.setEnabled(bool(self.amount_e.get_amount()) and not pi.has_expired() and not pi.is_error()) - self.save_button.setEnabled(not pi.is_error()) + self.save_button.setEnabled(not pi.is_error() and not pi.type in [PaymentIdentifierType.LNURLP, PaymentIdentifierType.LNADDR]) def _handle_payment_identifier(self): self.update_fields()