From b151d11e00eaf462e48bb6208dcc4eae3f403d52 Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Sat, 17 Feb 2024 16:50:38 -0600 Subject: [PATCH] Remove non-available BSQ explorer. --- core/src/main/java/bisq/core/app/BisqSetup.java | 10 ++++++++++ core/src/main/java/bisq/core/user/Preferences.java | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/app/BisqSetup.java b/core/src/main/java/bisq/core/app/BisqSetup.java index 107a12d085a..5ca7f7987e7 100644 --- a/core/src/main/java/bisq/core/app/BisqSetup.java +++ b/core/src/main/java/bisq/core/app/BisqSetup.java @@ -44,6 +44,7 @@ import bisq.core.support.dispute.refund.RefundManager; import bisq.core.trade.TradeManager; import bisq.core.trade.bisq_v1.TradeTxException; +import bisq.core.user.BlockChainExplorer; import bisq.core.user.Preferences; import bisq.core.user.User; import bisq.core.util.FormattingUtils; @@ -341,6 +342,7 @@ private void step4() { maybeShowLocalhostRunningInfo(); maybeShowAccountSigningStateInfo(); maybeShowTorAddressUpgradeInformation(); + maybeUpgradeBsqExplorerUrl(); checkInboundConnections(); } @@ -783,6 +785,14 @@ private void maybeTriggerDisplayHandler(String key, Consumer displayHand } } + private void maybeUpgradeBsqExplorerUrl() { + // if wiz BSQ explorer selected, replace with 1st explorer in the list of available. + if (preferences.getBsqBlockChainExplorer().name.equalsIgnoreCase("mempool.space (@wiz)") && + preferences.getBsqBlockChainExplorers().size() > 0) { + preferences.setBsqBlockChainExplorer(preferences.getBsqBlockChainExplorers().get(0)); + } + } + private void maybeShowTorAddressUpgradeInformation() { if (Config.baseCurrencyNetwork().isRegtest() || Utils.isV3Address(Objects.requireNonNull(p2PService.getNetworkNode().getNodeAddress()).getHostName())) { diff --git a/core/src/main/java/bisq/core/user/Preferences.java b/core/src/main/java/bisq/core/user/Preferences.java index e9eed2a65ca..6049b93715d 100644 --- a/core/src/main/java/bisq/core/user/Preferences.java +++ b/core/src/main/java/bisq/core/user/Preferences.java @@ -116,7 +116,6 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid )); public static final ArrayList BSQ_MAIN_NET_EXPLORERS = new ArrayList<>(Arrays.asList( - new BlockChainExplorer("mempool.space (@wiz)", "https://mempool.space/bisq/tx/", "https://mempool.space/bisq/address/"), new BlockChainExplorer("bisq.mempool.emzy.de (@emzy)", "https://bisq.mempool.emzy.de/tx/", "https://bisq.mempool.emzy.de/address/"), new BlockChainExplorer("mempool.bisq.services (@devinbileck)", "https://mempool.bisq.services/bisq/tx/", "https://mempool.bisq.services/bisq/address/") ));