fix hanging while posting or canceling offer

This commit is contained in:
woodser 2025-04-18 16:44:33 -04:00 committed by woodser
parent 39909e7936
commit bfef0f9492
3 changed files with 32 additions and 32 deletions

View file

@ -37,7 +37,6 @@ package haveno.core.xmr;
import com.google.inject.Inject;
import haveno.common.ThreadUtils;
import haveno.common.UserThread;
import haveno.core.api.model.XmrBalanceInfo;
import haveno.core.offer.OpenOffer;
import haveno.core.offer.OpenOfferManager;
@ -163,18 +162,12 @@ public class Balances {
// calculate reserved balance
reservedBalance = reservedOfferBalance.add(reservedTradeBalance);
// play sound if funds received
boolean fundsReceived = balanceSumBefore != null && getNonTradeBalanceSum().compareTo(balanceSumBefore) > 0;
if (fundsReceived) HavenoUtils.playCashRegisterSound();
// notify balance update
UserThread.execute(() -> {
// check if funds received
boolean fundsReceived = balanceSumBefore != null && getNonTradeBalanceSum().compareTo(balanceSumBefore) > 0;
if (fundsReceived) {
HavenoUtils.playCashRegisterSound();
}
// increase counter to notify listeners
updateCounter.set(updateCounter.get() + 1);
});
updateCounter.set(updateCounter.get() + 1);
}
}
}