Browse Source

default to hd capture on new osx installs

terminal
Craig Raw 4 years ago
parent
commit
e1f405d886
  1. 5
      src/main/java/com/sparrowwallet/sparrow/MainApp.java
  2. 10
      src/main/java/com/sparrowwallet/sparrow/io/Config.java

5
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);

10
src/main/java/com/sparrowwallet/sparrow/io/Config.java

@ -37,7 +37,7 @@ public class Config {
private List<File> 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();
}

Loading…
Cancel
Save