From 7bfba1510968c80cc56123f02d4471e7985899df Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 9 Dec 2023 06:10:31 -0500 Subject: [PATCH] do not resend deposits confirmed message after payout published --- .../haveno/core/trade/protocol/TradeProtocol.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java index 2d075430..ddce8e97 100644 --- a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java +++ b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java @@ -264,15 +264,10 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D } private void maybeSendDepositsConfirmedMessage() { - if (trade.isDepositsConfirmed()) { + new Thread(() -> maybeSendDepositsConfirmedMessages()).start(); + EasyBind.subscribe(trade.stateProperty(), state -> { new Thread(() -> maybeSendDepositsConfirmedMessages()).start(); - } else { - EasyBind.subscribe(trade.stateProperty(), state -> { - if (trade.isDepositsConfirmed()) { - new Thread(() -> maybeSendDepositsConfirmedMessages()).start(); - } - }); - } + }); } public void maybeReprocessPaymentReceivedMessage(boolean reprocessOnError) { @@ -880,8 +875,8 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D } public void maybeSendDepositsConfirmedMessages() { + if (!trade.isDepositsConfirmed() || trade.isDepositsConfirmedAcked() || trade.isPayoutPublished()) return; synchronized (trade) { - if (trade.isDepositsConfirmedAcked()) return; if (!trade.isInitialized() || trade.isShutDownStarted()) return; // skip if shutting down latchTrade(); expect(new Condition(trade))