From d41ad6fa5f682d58692d81c520ed7a715d4a87e7 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 19 Apr 2023 09:38:52 -0400 Subject: [PATCH] TransactionListItem does not fetch tx updates --- .../transactions/TransactionsListItem.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsListItem.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsListItem.java index 29de42b2a5..39cf6b9923 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsListItem.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsListItem.java @@ -34,9 +34,7 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; import monero.wallet.model.MoneroIncomingTransfer; import monero.wallet.model.MoneroOutgoingTransfer; -import monero.wallet.model.MoneroTxQuery; import monero.wallet.model.MoneroTxWallet; -import monero.wallet.model.MoneroWalletListener; import javax.annotation.Nullable; import java.math.BigInteger; @@ -62,7 +60,6 @@ class TransactionsListItem { private boolean initialTxConfidenceVisibility = true; private final Supplier lazyFieldsSupplier; private XmrWalletService xmrWalletService; - MoneroWalletListener walletListener; private static class LazyFields { TxConfidenceIndicator txConfidenceIndicator; @@ -185,26 +182,9 @@ class TransactionsListItem { GUIUtil.updateConfidence(tx, tooltip, txConfidenceIndicator); confirmations = tx.getNumConfirmations(); }}); - - // listen for tx updates - walletListener = new MoneroWalletListener() { - @Override - public void onNewBlock(long height) { - MoneroTxWallet tx = xmrWalletService.getWallet().getTxs(new MoneroTxQuery() - .setHash(txId) - .setInTxPool(confirmations > 0 ? false : null)).get(0); - GUIUtil.updateConfidence(tx, lazy().tooltip, lazy().txConfidenceIndicator); - confirmations = tx.getNumConfirmations(); - } - }; - xmrWalletService.addWalletListener(walletListener); } public void cleanup() { - if (walletListener != null) { - xmrWalletService.removeWalletListener(walletListener); - walletListener = null; - } } public TxConfidenceIndicator getTxConfidenceIndicator() {