From 763ee8602854f0eda269a04560d0d996acfb2c37 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 23 Mar 2021 11:04:58 +0100 Subject: [PATCH] lnwatcher: trigger 'verified' callback with the main wallet object. This is a temporary fix; we should not use an extra synchronizer, and persist results. --- electrum/lnwatcher.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py index aebc8468a..8ac0acf10 100644 --- a/electrum/lnwatcher.py +++ b/electrum/lnwatcher.py @@ -445,3 +445,11 @@ class LNWalletWatcher(LNWatcher): if tx_was_added: self.logger.info(f'added future tx: {name}. prevout: {prevout}') util.trigger_callback('wallet_updated', self.lnworker.wallet) + + def add_verified_tx(self, tx_hash: str, info: TxMinedInfo): + # this method is overloaded so that we have the GUI refreshed + # TODO: LNWatcher should not be an AddressSynchronizer, + # we should use the existing wallet instead, and results would be persisted + super().add_verified_tx(tx_hash, info) + tx_mined_status = self.get_tx_height(tx_hash) + util.trigger_callback('verified', self.lnworker.wallet, tx_hash, tx_mined_status)