diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 107e31670..b782dc4cf 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -908,9 +908,10 @@ class LNWallet(LNWorker): amount_msat = 0 label = 'Reverse swap' if swap.is_reverse else 'Forward swap' delta = current_height - swap.locktime - tx_height = self.lnwatcher.get_tx_height(swap.funding_txid) - if swap.is_reverse and tx_height.height <=0: - label += ' (%s)' % _('waiting for funding tx confirmation') + if self.lnwatcher: + tx_height = self.lnwatcher.get_tx_height(swap.funding_txid) + if swap.is_reverse and tx_height.height <= 0: + label += ' (%s)' % _('waiting for funding tx confirmation') if not swap.is_reverse and not swap.is_redeemed and swap.spending_txid is None and delta < 0: label += f' (refundable in {-delta} blocks)' # fixme: only if unspent out[txid] = {