From 1f90ef1c88293c9e6c8e3e6ac35f24d5b97dce56 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 14 Jan 2024 13:51:33 -0500 Subject: [PATCH] fix warning about multiple acks on payment sent --- .../portfolio/pendingtrades/PendingTradesViewModel.java | 9 +++++---- .../pendingtrades/steps/buyer/BuyerStep2View.java | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java index 73db3c3541..0a68b04afa 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java @@ -194,15 +194,16 @@ public class PendingTradesViewModel extends ActivatableWithDataModel { busyAnimation.stop(); statusLabel.setText(Res.get("shared.sendingConfirmationAgain")); @@ -166,18 +167,18 @@ public class BuyerStep2View extends TradeStepView { case BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG: busyAnimation.stop(); statusLabel.setText(Res.get("shared.messageStoredInMailbox")); - model.setMessageStateProperty(trade.getPaymentSentMessageState()); + model.setMessageStatePropertyIfNotAcked(MessageState.STORED_IN_MAILBOX); break; case SELLER_RECEIVED_PAYMENT_SENT_MSG: busyAnimation.stop(); statusLabel.setText(Res.get("shared.messageArrived")); - model.setMessageStateProperty(trade.getPaymentSentMessageState()); + model.setMessageStatePropertyIfNotAcked(MessageState.ARRIVED); break; case BUYER_SEND_FAILED_PAYMENT_SENT_MSG: // We get a popup and the trade closed, so we dont need to show anything here busyAnimation.stop(); statusLabel.setText(""); - model.setMessageStateProperty(trade.getPaymentSentMessageState()); + model.setMessageStatePropertyIfNotAcked(MessageState.FAILED); break; default: log.warn("Unexpected case: State={}, tradeId={} ", state.name(), trade.getId());