From 4a57b264698318ec660abf71433f879dab7f1662 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 15 Mar 2024 10:06:11 -0400 Subject: [PATCH] get txs after sync to update from pool --- .../main/java/haveno/core/xmr/wallet/XmrWalletService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index fd71f2b723..c9df98f8ce 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -333,7 +333,9 @@ public class XmrWalletService { Callable task = () -> wallet.sync(); Future future = syncWalletThreadPool.submit(task); try { - return future.get(); + MoneroSyncResult result = future.get(); + wallet.getTxs(); // TODO: this is necessary to sync from pool, otherwise balance can be incorrect + return result; } catch (Exception e) { throw new MoneroError(e.getMessage()); } @@ -893,7 +895,7 @@ public class XmrWalletService { } // register internal listener to notify external listeners - wallet.addListener(new XmrWalletListener()); + wallet.addListener(new XmrWalletListener()); // TODO: initial snapshot calls getTxs() which updates balance after returning but will not announce change } } }