From 4d847690968683d895e3e2a2a723d7fdea2c5ef6 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 24 Jul 2023 17:56:12 +0200 Subject: [PATCH] Qt: Show notification instead of popup if a lightning payment fails. --- electrum/gui/qt/main_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 71f652417..9b3c31724 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1195,10 +1195,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): 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.show_error(_('Payment failed') + '\n\n' + reason) + self.notify(_('Payment failed') + '\n\n' + reason) def get_coins(self, **kwargs) -> Sequence[PartialTxInput]: coins = self.get_manually_selected_coins()