From 6d8305c891c9eae6ea566c3fd331292d90fb7a68 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 359b8f47..4dfc5259 100644 --- a/desktop/src/main/java/bisq/desktop/util/GUIUtil.java +++ b/desktop/src/main/java/bisq/desktop/util/GUIUtil.java @@ -725,12 +725,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 boolean isReadyForTxBroadcastOrShowPopup(P2PService p2PService, CoreMoneroConnectionsService connectionService) {