Browse Source

rm dead code

patch-4
ThomasV 3 years ago
parent
commit
5faef83874
  1. 15
      electrum/gui/qt/lightning_tx_dialog.py

15
electrum/gui/qt/lightning_tx_dialog.py

@ -60,11 +60,9 @@ class LightningTxDialog(WindowModalDialog):
self.invoice = invoice.lightning_invoice
else:
self.invoice = ''
self.setMinimumWidth(700)
vbox = QVBoxLayout()
self.setLayout(vbox)
amount_str = self.parent.format_amount_and_units(self.amount, timestamp=self.timestamp)
vbox.addWidget(QLabel(_("Amount") + f": {amount_str}"))
if self.is_sent:
@ -74,28 +72,15 @@ class LightningTxDialog(WindowModalDialog):
vbox.addWidget(QLabel(_("Fee") + f": {fee_str}"))
time_str = datetime.datetime.fromtimestamp(self.timestamp).isoformat(' ')[:-3]
vbox.addWidget(QLabel(_("Date") + ": " + time_str))
vbox.addWidget(QLabel(_("Payment hash") + ":"))
self.hash_e = ShowQRLineEdit(self.payment_hash, self.config, title=_("Payment hash"))
vbox.addWidget(self.hash_e)
vbox.addWidget(QLabel(_("Preimage") + ":"))
self.preimage_e = ShowQRLineEdit(self.preimage, self.config, title=_("Preimage"))
vbox.addWidget(self.preimage_e)
vbox.addWidget(QLabel(_("Lightning Invoice") + ":"))
self.invoice_e = ShowQRTextEdit(self.invoice, config=self.config)
self.invoice_e.setMaximumHeight(150)
self.invoice_e.addCopyButton()
vbox.addWidget(self.invoice_e)
vbox.addLayout(Buttons(CloseButton(self)))
def show_qr(self, line_edit, title=''):
def f():
text = line_edit.text()
try:
self.parent.show_qrcode(text, title, parent=self)
except Exception as e:
self.show_message(repr(e))
return f

Loading…
Cancel
Save