diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 79d6cc829..0bf8a4ab1 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -55,7 +55,7 @@ from electrum import (keystore, ecc, constants, util, bitcoin, commands, from electrum.bitcoin import COIN, is_address from electrum.plugin import run_hook, BasePlugin from electrum.i18n import _ -from electrum.util import (format_time, +from electrum.util import (format_time, get_backup_dir, UserCancelled, profiler, bh2u, bfh, InvalidPassword, UserFacingException, @@ -628,7 +628,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): if not d.exec_(): return False backup_dir = get_backup_dir(self.config) - if backup_dir is not None: + if backup_dir is None: self.show_message(_("You need to configure a backup directory in your preferences"), title=_("Backup not configured")) return try: diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 3a301b9d0..b51e8f9ec 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -479,17 +479,9 @@ class ChannelBackup(AbstractChannel): def is_initiator(self): return self.cb.is_initiator - def short_id_for_GUI(self) -> str: - if self.short_channel_id: - return 'BACKUP of ' + format_short_channel_id(self.short_channel_id) - else: - return 'BACKUP' - def get_state_for_GUI(self): - if self.lnworker: - return self.lnworker.lnwatcher.get_channel_status(self.funding_outpoint.to_str()) - else: - return 'unknown' + cs = self.get_state() + return 'BACKUP' + ', '+ cs.name def get_oldest_unrevoked_ctn(self, who): return -1