mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
Create separate constant for RatesService delay
This commit is contained in:
parent
da1626070b
commit
17ea75603f
1 changed files with 2 additions and 1 deletions
|
@ -78,6 +78,7 @@ public class AppServices {
|
|||
private static final int RATES_PERIOD_SECS = 5 * 60;
|
||||
private static final int VERSION_CHECK_PERIOD_HOURS = 24;
|
||||
private static final int CONNECTION_DELAY_SECS = 2;
|
||||
private static final int RATES_STARTUP_DELAY_SECS = 5;
|
||||
private static final ExchangeSource DEFAULT_EXCHANGE_SOURCE = ExchangeSource.COINGECKO;
|
||||
private static final Currency DEFAULT_FIAT_CURRENCY = Currency.getInstance("USD");
|
||||
private static final String TOR_DEFAULT_PROXY_CIRCUIT_ID = "default";
|
||||
|
@ -356,7 +357,7 @@ public class AppServices {
|
|||
exchangeSource == null ? DEFAULT_EXCHANGE_SOURCE : exchangeSource,
|
||||
currency == null ? DEFAULT_FIAT_CURRENCY : currency);
|
||||
//Delay startup on first run
|
||||
ratesService.setDelay(Duration.seconds(CONNECTION_DELAY_SECS));
|
||||
ratesService.setDelay(Duration.seconds(RATES_STARTUP_DELAY_SECS));
|
||||
ratesService.setPeriod(Duration.seconds(RATES_PERIOD_SECS));
|
||||
ratesService.setRestartOnFailure(true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue