1
0

Allow wallets to use non-deterministic lightning,

if they use a software keystore.

This excludes hardware wallets and watching-only wallet.
Also, this forbids creation of new channels in those wallets,
in case lightning was previously enabled.

Fixes #9440
This commit is contained in:
ThomasV
2025-03-17 09:01:04 +01:00
parent f8714dd57a
commit 58be5a3ad5
5 changed files with 29 additions and 14 deletions

View File

@@ -134,7 +134,7 @@ Pane {
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
enabled: Daemon.currentWallet.confirmedBalance.satsInt > 0
enabled: Daemon.currentWallet.canHaveLightning && Daemon.currentWallet.confirmedBalance.satsInt > 0
text: qsTr('Open Channel')
onClicked: {
if (Daemon.currentWallet.channelModel.count == 0) {

View File

@@ -368,7 +368,7 @@ class ChannelsList(MyTreeView):
# and maybe add item "main_window.init_lightning_dialog()" when applicable
menu.setEnabled(self.wallet.has_lightning())
self.new_channel_button = EnterButton(_('New Channel'), self.main_window.new_channel_dialog)
self.new_channel_button.setEnabled(self.wallet.has_lightning())
self.new_channel_button.setEnabled(self.wallet.can_have_lightning())
toolbar.insertWidget(2, self.new_channel_button)
return toolbar