Add 'has_onchain_backup' to channel storage, to fix the displayed icon.
Note that this will not fix the value for already existing channels that have been created with onchain backup; one would need a wallet_db upgrade in order to fix them (probably not worth the effort).
This commit is contained in:
@@ -211,7 +211,7 @@ class LightningOpenChannelDialog(Factory.Popup, Logger):
|
||||
self.app.show_error(_('Problem opening channel: ') + '\n' + repr(e))
|
||||
return
|
||||
# TODO: it would be nice to show this before broadcasting
|
||||
if lnworker.has_recoverable_channels():
|
||||
if chan.has_onchain_backup():
|
||||
self.maybe_show_funding_tx(chan, funding_tx)
|
||||
else:
|
||||
title = _('Save backup')
|
||||
|
||||
@@ -538,11 +538,13 @@ class ChannelFeatureIcons:
|
||||
feats = []
|
||||
if chan.is_backup():
|
||||
feats.append(ChanFeatBackup())
|
||||
if chan.is_imported:
|
||||
feats.append(ChanFeatNoOnchainBackup())
|
||||
else:
|
||||
feats.append(ChanFeatChannel())
|
||||
if chan.lnworker.is_trampoline_peer(chan.node_id):
|
||||
feats.append(ChanFeatTrampoline())
|
||||
if not chan.lnworker.has_recoverable_channels():
|
||||
if not chan.has_onchain_backup():
|
||||
feats.append(ChanFeatNoOnchainBackup())
|
||||
return ChannelFeatureIcons(feats)
|
||||
|
||||
|
||||
@@ -1840,7 +1840,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
||||
def on_open_channel_success(self, args):
|
||||
chan, funding_tx = args
|
||||
lnworker = self.wallet.lnworker
|
||||
if not lnworker.has_recoverable_channels():
|
||||
if not chan.has_onchain_backup():
|
||||
backup_dir = self.config.get_backup_dir()
|
||||
if backup_dir is not None:
|
||||
self.show_message(_(f'Your wallet backup has been updated in {backup_dir}'))
|
||||
|
||||
Reference in New Issue
Block a user