1
0

minor: fix channel backup icon

This commit is contained in:
ThomasV
2021-03-24 06:48:17 +01:00
parent 2b3c64a9d7
commit f2aa52e5aa

View File

@@ -539,17 +539,15 @@ class ChannelFeatureIcons:
@classmethod
def from_channel(cls, chan: AbstractChannel) -> 'ChannelFeatureIcons':
if not isinstance(chan, Channel):
return ChannelFeatureIcons([])
feats = []
if chan.is_backup():
feats.append(ChanFeatBackup())
else:
feats.append(ChanFeatChannel())
if chan.lnworker.is_trampoline_peer(chan.node_id):
feats.append(ChanFeatTrampoline())
if not chan.lnworker.has_recoverable_channels():
feats.append(ChanFeatNoOnchainBackup())
if chan.lnworker.is_trampoline_peer(chan.node_id):
feats.append(ChanFeatTrampoline())
if not chan.lnworker.has_recoverable_channels():
feats.append(ChanFeatNoOnchainBackup())
return ChannelFeatureIcons(feats)
def paint(self, painter: QPainter, rect: QRect) -> None: