From 40650103d9728efb7d407ca7de51c1125cf237f3 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 23 Jan 2024 13:39:16 -0500 Subject: [PATCH] get wallet height off user thread --- .../main/java/haveno/core/xmr/wallet/XmrWalletService.java | 5 +++-- 1 file changed, 3 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 28091c4945..516ef669b0 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -894,11 +894,12 @@ public class XmrWalletService { } private void updateSyncProgress() { + long height = wallet.getHeight(); UserThread.await(() -> { - walletHeight.set(wallet.getHeight()); + walletHeight.set(height); // new wallet reports height 1 before synced - if (wallet.getHeight() == 1) { + if (height == 1) { downloadListener.progress(.0001, xmrConnectionService.getTargetHeight(), null); // >0% shows progress bar return; }