From 29a488d3aff518533b5e7b7d9f90081d69d1019a Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 23 Jan 2024 13:41:53 -0500 Subject: [PATCH] update balances off user thread --- core/src/main/java/haveno/core/xmr/Balances.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/haveno/core/xmr/Balances.java b/core/src/main/java/haveno/core/xmr/Balances.java index 29bd449aad..3a5bee182e 100644 --- a/core/src/main/java/haveno/core/xmr/Balances.java +++ b/core/src/main/java/haveno/core/xmr/Balances.java @@ -17,6 +17,7 @@ package haveno.core.xmr; +import haveno.common.ThreadUtils; import haveno.common.UserThread; import haveno.core.offer.OpenOffer; import haveno.core.offer.OpenOfferManager; @@ -87,6 +88,10 @@ public class Balances { } private void updateBalances() { + ThreadUtils.submitToPool(() -> doUpdateBalances()); + } + + private void doUpdateBalances() { // get wallet balances BigInteger balance = xmrWalletService.getWallet() == null ? BigInteger.ZERO : xmrWalletService.getWallet().getBalance(0);