qt wallet>info: add text if lightning is not available for wallet

This commit is contained in:
SomberNight 2020-04-26 05:49:34 +02:00
parent b59c3294b2
commit 100a216165
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -2260,6 +2260,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
ks_type = str(keystore_types[0]) if keystore_types else _('No keystore')
grid.addWidget(QLabel(ks_type), 4, 1)
# lightning
grid.addWidget(QLabel(_('Lightning') + ':'), 5, 0)
if self.wallet.can_have_lightning():
if self.wallet.has_lightning():
lightning_b = QPushButton(_('Disable'))
@ -2272,9 +2273,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
lightning_b.clicked.connect(dialog.close)
lightning_b.clicked.connect(self.enable_lightning)
lightning_label = QLabel(_('Disabled'))
grid.addWidget(QLabel(_('Lightning')), 5, 0)
grid.addWidget(lightning_label, 5, 1)
grid.addWidget(lightning_b, 5, 2)
else:
grid.addWidget(QLabel(_("Not available for this wallet.")), 5, 1)
grid.addWidget(HelpButton(_("Lightning is currently restricted to HD wallets with p2wpkh addresses.")), 5, 2)
vbox.addLayout(grid)
labels_clayout = None