fix when getProxyServer returns null on getWhirlpool

This commit is contained in:
diogo 2021-08-22 19:10:43 +03:00
parent 37c4ff4dd7
commit 0983c40d7a
No known key found for this signature in database
GPG key ID: ED45B7CCDB979B99

View file

@ -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);
}