Skip to content

Commit

Permalink
log level revert and minor startup fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Jan 13, 2021
1 parent caa7ef4 commit 64a9cce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/main/java/com/sparrowwallet/sparrow/AppServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,13 @@ public void feeRateSourceChanged(FeeRatesSourceChangedEvent event) {

@Subscribe
public void fiatCurrencySelected(FiatCurrencySelectedEvent event) {
ratesService.cancel();
if(ratesService != null) {
ratesService.cancel();

if(Config.get().getMode() != Mode.OFFLINE && event.getExchangeSource() != ExchangeSource.NONE) {
ratesService = createRatesService(event.getExchangeSource(), event.getCurrency());
ratesService.start();
if(Config.get().getMode() != Mode.OFFLINE && event.getExchangeSource() != ExchangeSource.NONE) {
ratesService = createRatesService(event.getExchangeSource(), event.getCurrency());
ratesService.start();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sparrowwallet/sparrow/net/Bwt.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void start(List<String> outputDescriptors, Integer rescanSince, Boolean
}

bwtConfig.verbose = log.isDebugEnabled() ? 2 : 0;
if(!log.isInfoEnabled()) {
if(!log.isDebugEnabled()) {
bwtConfig.setupLogger = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public void changed(ObservableValue<? extends Currency> observable, Currency old
public void initializeView(Config config) {
if(config.getBitcoinUnit() != null) {
bitcoinUnit.setValue(config.getBitcoinUnit());
} else {
bitcoinUnit.setValue(BitcoinUnit.AUTO);
}

bitcoinUnit.valueProperty().addListener((observable, oldValue, newValue) -> {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</encoder>
</appender>

<root level="debug">
<root level="info">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
Expand Down

0 comments on commit 64a9cce

Please sign in to comment.