lnworker: extend swap label only if we are still watching the address
Without this, old swap transactions for which we have deleted the channel are incorrectly labeled.
This commit is contained in:
@@ -936,6 +936,7 @@ class LNWallet(LNWorker):
|
|||||||
amount_msat = 0
|
amount_msat = 0
|
||||||
label = 'Reverse swap' if swap.is_reverse else 'Forward swap'
|
label = 'Reverse swap' if swap.is_reverse else 'Forward swap'
|
||||||
delta = current_height - swap.locktime
|
delta = current_height - swap.locktime
|
||||||
|
if self.wallet.adb.is_mine(swap.funding_txid):
|
||||||
tx_height = self.wallet.adb.get_tx_height(swap.funding_txid)
|
tx_height = self.wallet.adb.get_tx_height(swap.funding_txid)
|
||||||
if swap.is_reverse and tx_height.height <= 0:
|
if swap.is_reverse and tx_height.height <= 0:
|
||||||
label += ' (%s)' % _('waiting for funding tx confirmation')
|
label += ' (%s)' % _('waiting for funding tx confirmation')
|
||||||
|
|||||||
Reference in New Issue
Block a user