From 4f4b0f6ce97878a81155aac29401b8206ed42c41 Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 3 Jan 2020 18:17:41 +0900 Subject: [PATCH] If no valid Bitcoin block explorer is set, use the 1st block explorer --- core/src/main/java/bisq/core/user/Preferences.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/user/Preferences.java b/core/src/main/java/bisq/core/user/Preferences.java index a2ba7927e35..e2488e10a50 100644 --- a/core/src/main/java/bisq/core/user/Preferences.java +++ b/core/src/main/java/bisq/core/user/Preferences.java @@ -252,7 +252,13 @@ public void readPersisted() { useStandbyModeProperty.set(prefPayload.isUseStandbyMode()); cssThemeProperty.set(prefPayload.getCssTheme()); - // if no valid block explorer is set, randomly select a valid BSQ block explorer + // if no valid Bitcoin block explorer is set, select the 1st valid Bitcoin block explorer + ArrayList btcExplorers = getBlockChainExplorers(); + BlockChainExplorer btcExplorer = getBlockChainExplorer(); + if (btcExplorer == null || btcExplorers.contains(btcExplorer) == false) + setBlockChainExplorer(btcExplorers.get(0)); + + // if no valid BSQ block explorer is set, randomly select a valid BSQ block explorer ArrayList bsqExplorers = getBsqBlockChainExplorers(); BlockChainExplorer bsqExplorer = getBsqBlockChainExplorer(); if (bsqExplorer == null || bsqExplorers.contains(bsqExplorer) == false)