"walletsPath" is now configurable in the settings.

This commit is contained in:
CalDescent 2022-05-07 17:01:19 +01:00
parent f36e193650
commit 58917eeeb4
2 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.qortal.crypto.Crypto;
import org.qortal.settings.Settings;
import org.qortal.utils.Base58;
import java.io.ByteArrayOutputStream;
@ -233,7 +234,7 @@ public class PirateWallet {
private Path getCurrentWalletPath() {
String entropyHash58 = this.getEntropyHash58();
String filename = String.format("wallet-%s.dat", entropyHash58);
return Paths.get("wallets", "PirateChain", filename);
return Paths.get(Settings.getInstance().getWalletsPath(), "PirateChain", filename);
}
public boolean isInitialized() {

View File

@ -232,6 +232,9 @@ public class Settings {
/** Whether to show SysTray pop-up notifications when trade-bot entries change state */
private boolean tradebotSystrayEnabled = false;
/** Wallets path - used for storing enrppted wallet caches for coins that require them */
private String walletsPath = "wallets";
// Repository related
/** Queries that take longer than this are logged. (milliseconds) */
private Long slowQueryThreshold = null;
@ -698,6 +701,10 @@ public class Settings {
return this.pirateChainNet;
}
public String getWalletsPath() {
return this.walletsPath;
}
public boolean isTradebotSystrayEnabled() {
return this.tradebotSystrayEnabled;
}