1
0

qt: disallow save of LNURLp/LnAddr

This commit is contained in:
Sander van Grieken
2023-06-26 17:32:02 +02:00
parent 6b57743c3e
commit 3df13b8ce4

View File

@@ -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()