diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java index b309de20a3..02f1943bcf 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java @@ -54,7 +54,6 @@ import haveno.desktop.util.CssTheme; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.FormBuilder; import haveno.network.p2p.NodeAddress; -import javafx.application.Platform; import javafx.beans.binding.Bindings; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; @@ -931,11 +930,7 @@ public class PendingTradesView extends ActivatableViewAndModel Platform.runLater(new Runnable() { - @Override public void run() { - update(); - } - }); + listener = (observable, oldValue, newValue) -> UserThread.execute(() -> update()); trade.stateProperty().addListener(listener); update(); } else { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java index d236a6c373..362518ae94 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java @@ -424,12 +424,7 @@ public abstract class TradeStepView extends AnchorPane { log.warn("deactivating TradeStepView because model's trade is null"); // schedule deactivation to avoid concurrent modification of clock listeners - Platform.runLater(new Runnable() { - @Override - public void run() { - deactivate(); - } - }); + Platform.runLater(() -> deactivate()); return; }