From 0983c40d7a1c34557463c7baa58f658783a577eb Mon Sep 17 00:00:00 2001 From: diogo Date: Sun, 22 Aug 2021 19:10:43 +0300 Subject: [PATCH] fix when getProxyServer returns null on getWhirlpool --- src/main/java/com/sparrowwallet/sparrow/AppServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index f7ce3089..b15ad70c 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -455,7 +455,7 @@ public class AppServices { public Whirlpool getWhirlpool(String walletId) { Whirlpool whirlpool = whirlpoolMap.get(walletId); if(whirlpool == null) { - HostAndPort torProxy = AppServices.isTorRunning() ? HostAndPort.fromParts("localhost", TorService.PROXY_PORT) : (Config.get().getProxyServer().isEmpty() || !Config.get().isUseProxy() ? null : HostAndPort.fromString(Config.get().getProxyServer())); + HostAndPort torProxy = AppServices.isTorRunning() ? HostAndPort.fromParts("localhost", TorService.PROXY_PORT) : ((Config.get().getProxyServer() == null || Config.get().getProxyServer().isEmpty()) || !Config.get().isUseProxy() ? null : HostAndPort.fromString(Config.get().getProxyServer())); whirlpool = new Whirlpool(Network.get(), torProxy, Config.get().getScode(), 1, 15); whirlpoolMap.put(walletId, whirlpool); }