From 6b6e1e15d4a2d08d32b889cc4e64325fa541ed2c Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 11 Jul 2023 14:52:30 -0400 Subject: [PATCH] sync wallet on dispute chat message ack --- core/src/main/java/haveno/core/support/SupportManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/haveno/core/support/SupportManager.java b/core/src/main/java/haveno/core/support/SupportManager.java index e5a873cad2..53177dbdf3 100644 --- a/core/src/main/java/haveno/core/support/SupportManager.java +++ b/core/src/main/java/haveno/core/support/SupportManager.java @@ -187,13 +187,14 @@ public abstract class SupportManager { log.info("Received AckMessage for {} with tradeId {} and uid {}", ackMessage.getSourceMsgClassName(), ackMessage.getSourceId(), ackMessage.getSourceUid()); - // dispute is opened by ack on chat message + // ack message on chat message received when dispute is opened and closed if (ackMessage.getSourceMsgClassName().equals(ChatMessage.class.getSimpleName())) { Trade trade = tradeManager.getTrade(ackMessage.getSourceId()); for (Dispute dispute : trade.getDisputes()) { for (ChatMessage chatMessage : dispute.getChatMessages()) { if (chatMessage.getUid().equals(ackMessage.getSourceUid())) { - trade.advanceDisputeState(Trade.DisputeState.DISPUTE_OPENED); + if (dispute.isClosed()) trade.syncWalletNormallyForMs(30000); // sync to check for payout + else trade.advanceDisputeState(Trade.DisputeState.DISPUTE_OPENED); } } }