Qt: Show notification instead of popup if a lightning payment fails.
This commit is contained in:
@@ -1195,10 +1195,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
|||||||
return
|
return
|
||||||
invoice = self.wallet.get_invoice(key)
|
invoice = self.wallet.get_invoice(key)
|
||||||
if invoice and invoice.is_lightning() and invoice.get_address():
|
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?'):
|
if self.question(_('Payment failed') + '\n\n' + reason + '\n\n'+ 'Fallback to onchain payment?'):
|
||||||
self.send_tab.pay_onchain_dialog(invoice.get_outputs())
|
self.send_tab.pay_onchain_dialog(invoice.get_outputs())
|
||||||
else:
|
else:
|
||||||
self.show_error(_('Payment failed') + '\n\n' + reason)
|
self.notify(_('Payment failed') + '\n\n' + reason)
|
||||||
|
|
||||||
def get_coins(self, **kwargs) -> Sequence[PartialTxInput]:
|
def get_coins(self, **kwargs) -> Sequence[PartialTxInput]:
|
||||||
coins = self.get_manually_selected_coins()
|
coins = self.get_manually_selected_coins()
|
||||||
|
|||||||
Reference in New Issue
Block a user