1
0

lnwatcher: trigger 'verified' callback with the main wallet object.

This is a temporary fix; we should not use an extra synchronizer, and persist results.
This commit is contained in:
ThomasV
2021-03-23 11:04:58 +01:00
parent f7d2a33d45
commit 763ee86028

View File

@@ -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)