From 6dedce1d27fa0da507426ad51fb648aefeb47c50 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 12 May 2024 10:02:40 -0400 Subject: [PATCH] do not cancel take offer screen on maker disconnect if initializing --- .../haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java index c6baf04b16..c8f21ff0aa 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java @@ -493,6 +493,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im connectionListener = new ConnectionListener() { @Override public void onDisconnect(CloseConnectionReason closeConnectionReason, Connection connection) { + if (trade == null) return; // ignore if trade initializing if (connection.getPeersNodeAddressOptional().isPresent() && connection.getPeersNodeAddressOptional().get().equals(offer.getMakerNodeAddress())) { offerWarning.set(Res.get("takeOffer.warning.connectionToPeerLost"));