From ac04c97219c641d6a5134e45890eb856bedc1a49 Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Thu, 18 Aug 2022 10:50:27 -0500 Subject: [PATCH] Prevent UI trading actions when there are no P2P connections. --- desktop/src/main/java/bisq/desktop/util/GUIUtil.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java index 82a1791d0e..0f09a4de6c 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -795,12 +795,11 @@ public class GUIUtil { } public static boolean isBootstrappedOrShowPopup(P2PService p2PService) { - if (!p2PService.isBootstrapped()) { - new Popup().information(Res.get("popup.warning.notFullyConnected")).show(); - return false; + if (p2PService.isBootstrapped() && p2PService.getNumConnectedPeers().get() > 0) { + return true; } - - return true; + new Popup().information(Res.get("popup.warning.notFullyConnected")).show(); + return false; } public static void showDaoNeedsResyncPopup(Navigation navigation) {