mirror of
https://github.com/boldsuck/haveno.git
synced 2025-03-24 08:09:21 +00:00
get wallet height off user thread
This commit is contained in:
parent
d0a489198b
commit
40650103d9
1 changed files with 3 additions and 2 deletions
|
@ -894,11 +894,12 @@ public class XmrWalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSyncProgress() {
|
private void updateSyncProgress() {
|
||||||
|
long height = wallet.getHeight();
|
||||||
UserThread.await(() -> {
|
UserThread.await(() -> {
|
||||||
walletHeight.set(wallet.getHeight());
|
walletHeight.set(height);
|
||||||
|
|
||||||
// new wallet reports height 1 before synced
|
// new wallet reports height 1 before synced
|
||||||
if (wallet.getHeight() == 1) {
|
if (height == 1) {
|
||||||
downloadListener.progress(.0001, xmrConnectionService.getTargetHeight(), null); // >0% shows progress bar
|
downloadListener.progress(.0001, xmrConnectionService.getTargetHeight(), null); // >0% shows progress bar
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue