mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
fix ssl handshake issue
This commit is contained in:
parent
e7c83e1d3f
commit
03abc59ed3
3 changed files with 14 additions and 0 deletions
|
@ -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']
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue