qt: add missing case for on-chain fallback for BIP21 payment identfier containing lightning invoice
This commit is contained in:
@@ -698,6 +698,8 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
|
|||||||
num_sats_can_send = int(lnworker.num_sats_can_send())
|
num_sats_can_send = int(lnworker.num_sats_can_send())
|
||||||
msg += '\n' + _('Your channels can send {}.').format(self.format_amount(num_sats_can_send) + ' ' + self.base_unit())
|
msg += '\n' + _('Your channels can send {}.').format(self.format_amount(num_sats_can_send) + ' ' + self.base_unit())
|
||||||
if not choices:
|
if not choices:
|
||||||
|
if not can_pay_onchain:
|
||||||
|
msg += '\n' + _('Also, you have insufficient funds to pay on-chain.')
|
||||||
self.window.show_error(msg)
|
self.window.show_error(msg)
|
||||||
return
|
return
|
||||||
r = self.window.query_choice(msg, choices)
|
r = self.window.query_choice(msg, choices)
|
||||||
|
|||||||
@@ -173,6 +173,8 @@ class PaymentIdentifier(Logger):
|
|||||||
return True
|
return True
|
||||||
if self._type in [PaymentIdentifierType.LNURLP, PaymentIdentifierType.BOLT11, PaymentIdentifierType.LNADDR]:
|
if self._type in [PaymentIdentifierType.LNURLP, PaymentIdentifierType.BOLT11, PaymentIdentifierType.LNADDR]:
|
||||||
return bool(self.bolt11) and bool(self.bolt11.get_address())
|
return bool(self.bolt11) and bool(self.bolt11.get_address())
|
||||||
|
if self._type == PaymentIdentifierType.BIP21:
|
||||||
|
return bool(self.bip21.get('address', None)) or (bool(self.bolt11) and bool(self.bolt11.get_address()))
|
||||||
|
|
||||||
def is_multiline(self):
|
def is_multiline(self):
|
||||||
return bool(self.multiline_outputs)
|
return bool(self.multiline_outputs)
|
||||||
|
|||||||
Reference in New Issue
Block a user