channels_list: show backup text in the state column. fix missing import in previous commit.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user