tfix #5761 - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit b9cf095e1a0e44121fd4f3b1861c14ff82d36931
DIR parent ade47e331a6c5ab9c386eedce1f67b766ecb4ec3
HTML Author: ThomasV <thomasv@electrum.org>
Date: Mon, 18 Nov 2019 05:48:21 +0100
fix #5761
Diffstat:
M electrum/gui/qt/main_window.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
t@@ -1428,7 +1428,15 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
if not self.wallet.lnworker:
self.show_error(_('Lightning is disabled'))
return
- return self.wallet.lnworker.parse_bech32_invoice(invoice)
+ invoice_dict = self.wallet.lnworker.parse_bech32_invoice(invoice)
+ if invoice_dict.get('amount') is None:
+ amount = self.amount_e.get_amount()
+ if amount:
+ invoice_dict['amount'] = amount
+ else:
+ self.show_error(_('No amount'))
+ return
+ return invoice_dict
else:
outputs = self.read_outputs()
if self.check_send_tab_onchain_outputs_and_show_errors(outputs):