From da1626070b5eeb1007b37ccfc20d5312af34a99c Mon Sep 17 00:00:00 2001 From: PrinceOfEgypt Date: Sat, 24 Feb 2024 09:36:02 -0600 Subject: [PATCH] Add 2 second delay to RatesService --- src/main/java/com/sparrowwallet/sparrow/AppServices.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index f35dbb4d..2d7d9bd6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -355,6 +355,8 @@ public class AppServices { ExchangeSource.RatesService ratesService = new ExchangeSource.RatesService( 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.setPeriod(Duration.seconds(RATES_PERIOD_SECS)); ratesService.setRestartOnFailure(true);