1
0

qt: on_event_payment_failed: remove onchain fallback dialog

We no longer create LN invoices with onchain fallbacks. Even if
other implementation might create such invoices, there is little
point suporting them.
This commit is contained in:
ThomasV
2025-05-31 14:07:13 +02:00
parent fc13001bb9
commit cea4b99668

View File

@@ -1382,13 +1382,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
def on_event_payment_failed(self, wallet, key, reason):
if wallet != self.wallet:
return
invoice = self.wallet.get_invoice(key)
if invoice and invoice.is_lightning() and invoice.get_address():
# fixme: we should display this popup only if the user initiated the payment
if self.question(_('Payment failed') + '\n\n' + reason + '\n\n'+ 'Fallback to onchain payment?'):
self.send_tab.pay_onchain_dialog(invoice.get_outputs())
else:
self.notify(_('Payment failed') + '\n\n' + reason)
description = self.wallet.get_label_for_rhash(key)
self.notify(_('Payment failed') + '\n\n' + description + '\n\n' + reason)
def get_coins(self, **kwargs) -> Sequence[PartialTxInput]:
coins = self.get_manually_selected_coins()