qt: disallow save of LNURLp/LnAddr
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user