fix ssl handshake issue

This commit is contained in:
Craig Raw 2020-08-05 12:36:50 +02:00
parent e7c83e1d3f
commit 03abc59ed3
3 changed files with 14 additions and 0 deletions

View file

@ -92,6 +92,7 @@ jlink {
requires 'java.logging'
requires 'javafx.base'
requires 'com.fasterxml.jackson.databind'
requires 'jdk.crypto.cryptoki'
}
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages', '--ignore-signing-information', '--exclude-files', '**.png']

View file

@ -5,6 +5,8 @@ import com.sparrowwallet.sparrow.event.ExchangeRatesUpdatedEvent;
import javafx.concurrent.ScheduledService;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.InputStream;
import java.io.InputStreamReader;
@ -51,6 +53,7 @@ public enum ExchangeSource {
Gson gson = new Gson();
return gson.fromJson(reader, CoinbaseRates.class);
} catch (Exception e) {
log.error("Error retrieving currency rates", e);
return new CoinbaseRates();
}
}
@ -80,11 +83,14 @@ public enum ExchangeSource {
Gson gson = new Gson();
return gson.fromJson(reader, CoinGeckoRates.class);
} catch (Exception e) {
log.error("Error retrieving currency rates", e);
return new CoinGeckoRates();
}
}
};
private static final Logger log = LoggerFactory.getLogger(ExchangeSource.class);
private final String name;
ExchangeSource(String name) {

View file

@ -11,11 +11,15 @@ import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.fxml.FXML;
import javafx.scene.control.ComboBox;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Currency;
import java.util.List;
public class GeneralPreferencesController extends PreferencesDetailController {
private static final Logger log = LoggerFactory.getLogger(GeneralPreferencesController.class);
@FXML
private ComboBox<BitcoinUnit> bitcoinUnit;
@ -81,6 +85,9 @@ public class GeneralPreferencesController extends PreferencesDetailController {
currenciesService.setOnSucceeded(event -> {
updateCurrencies(currenciesService.getValue());
});
currenciesService.setOnFailed(event -> {
log.error("Error retrieving currencies", event.getSource().getException());
});
currenciesService.start();
}