diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py index e078603fc..78c5e0e47 100644 --- a/electrum/gui/kivy/main_window.py +++ b/electrum/gui/kivy/main_window.py @@ -973,6 +973,13 @@ class ElectrumWindow(App, Logger): # via self.get_amount()... the need for converting back should be removed return format_satoshis_plain(x, decimal_point=self.decimal_point()) + ' ' + self.base_unit + def format_amount_and_units_with_fiat(self, x) -> str: + text = self.format_amount_and_units(x) + fiat = self.fx.format_amount_and_units(x) if self.fx else None + if text and fiat: + text += f' ({fiat})' + return text + def format_fee_rate(self, fee_rate): # fee_rate is in sat/kB return format_fee_satoshis(fee_rate/1000) + ' sat/byte' diff --git a/electrum/gui/kivy/uix/screens.py b/electrum/gui/kivy/uix/screens.py index 53c19a57d..091dcd0c2 100644 --- a/electrum/gui/kivy/uix/screens.py +++ b/electrum/gui/kivy/uix/screens.py @@ -341,7 +341,9 @@ class SendScreen(CScreen, Logger): def do_pay_invoice(self, invoice): if invoice.is_lightning(): if self.app.wallet.lnworker: - self.app.protected(_('Pay lightning invoice?'), self._do_pay_lightning, (invoice,)) + amount_sat = invoice.get_amount_sat() + msg = _("Pay lightning invoice?") + '\n\n' + _("This will send {}?").format(self.app.format_amount_and_units_with_fiat(amount_sat)) +'\n' + self.app.protected(msg, self._do_pay_lightning, (invoice,)) else: self.app.show_error(_("Lightning payments are not available for this wallet")) else: