diff --git a/src/main/java/com/sparrowwallet/sparrow/MainApp.java b/src/main/java/com/sparrowwallet/sparrow/MainApp.java index 609c4e25..574cbc37 100644 --- a/src/main/java/com/sparrowwallet/sparrow/MainApp.java +++ b/src/main/java/com/sparrowwallet/sparrow/MainApp.java @@ -19,6 +19,7 @@ import javafx.application.Application; import javafx.scene.text.Font; import javafx.stage.Stage; import org.controlsfx.glyphfont.GlyphFontRegistry; +import org.controlsfx.tools.Platform; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.bridge.SLF4JBridgeHandler; @@ -79,6 +80,10 @@ public class MainApp extends Application { Config.get().setCoreWallet(""); } + if(Config.get().getHdCapture() == null && Platform.getCurrent() == Platform.OSX) { + Config.get().setHdCapture(Boolean.TRUE); + } + System.setProperty(Wallet.ALLOW_DERIVATIONS_MATCHING_OTHER_SCRIPT_TYPES_PROPERTY, Boolean.toString(!Config.get().isValidateDerivationPaths())); AppController appController = AppServices.newAppWindow(stage); diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Config.java b/src/main/java/com/sparrowwallet/sparrow/io/Config.java index ff1de8bd..f6a316e1 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Config.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Config.java @@ -37,7 +37,7 @@ public class Config { private List recentWalletFiles; private Integer keyDerivationPeriod; private File hwi; - private boolean hdCapture; + private Boolean hdCapture; private ServerType serverType; private String publicElectrumServer; private String coreServer; @@ -263,11 +263,15 @@ public class Config { flush(); } - public boolean isHdCapture() { + public Boolean getHdCapture() { return hdCapture; } - public void setHdCapture(boolean hdCapture) { + public Boolean isHdCapture() { + return hdCapture != null && hdCapture; + } + + public void setHdCapture(Boolean hdCapture) { this.hdCapture = hdCapture; flush(); }