Remove WALLET_DIR. Use APP_DATA_DIR_KEY instead.

This commit is contained in:
Manfred Karrer 2018-01-09 20:18:43 +01:00
parent e8fbd7a3bc
commit cdc1061571
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
5 changed files with 4 additions and 6 deletions

View file

@ -415,7 +415,6 @@ public class BisqEnvironment extends StandardEnvironment {
setProperty(BtcOptionKeys.BTC_NODES, btcNodes);
setProperty(BtcOptionKeys.USE_TOR_FOR_BTC, useTorForBtc);
setProperty(BtcOptionKeys.WALLET_DIR, btcNetworkDir);
setProperty(BtcOptionKeys.USER_AGENT, userAgent);
setProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES, useAllProvidedNodes);
setProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC, numConnectionForBtc);

View file

@ -46,8 +46,8 @@ public class BitcoinModule extends AppModule {
bindConstant().annotatedWith(named(UserAgent.VERSION_KEY)).to(environment.getRequiredProperty(UserAgent.VERSION_KEY));
bind(UserAgent.class).in(Singleton.class);
File walletDir = new File(environment.getRequiredProperty(BtcOptionKeys.WALLET_DIR));
bind(File.class).annotatedWith(named(BtcOptionKeys.WALLET_DIR)).toInstance(walletDir);
File walletDir = new File(environment.getRequiredProperty(AppOptionKeys.APP_DATA_DIR_KEY));
bind(File.class).annotatedWith(named(AppOptionKeys.APP_DATA_DIR_KEY)).toInstance(walletDir);
bindConstant().annotatedWith(named(BtcOptionKeys.BTC_NODES)).to(environment.getRequiredProperty(BtcOptionKeys.BTC_NODES));
bindConstant().annotatedWith(named(BtcOptionKeys.USER_AGENT)).to(environment.getRequiredProperty(BtcOptionKeys.USER_AGENT));

View file

@ -5,7 +5,6 @@ public class BtcOptionKeys {
public static final String USE_TOR_FOR_BTC = "useTorForBtc";
public static final String SOCKS5_DISCOVER_MODE = "socks5DiscoverMode";
public static final String BASE_CURRENCY_NETWORK = "baseCurrencyNetwork";
public static final String WALLET_DIR = "walletDir";
public static final String USER_AGENT = "userAgent";
public static final String USE_ALL_PROVIDED_NODES = "useAllProvidedNodes"; // We only use onion nodes if tor is enabled. That flag overrides that default behavior.
public static final String NUM_CONNECTIONS_FOR_BTC = "numConnectionForBtc";

View file

@ -29,6 +29,7 @@ import io.bisq.common.app.Log;
import io.bisq.common.handlers.ExceptionHandler;
import io.bisq.common.handlers.ResultHandler;
import io.bisq.common.storage.FileUtil;
import io.bisq.core.app.AppOptionKeys;
import io.bisq.core.app.BisqEnvironment;
import io.bisq.core.btc.*;
import io.bisq.core.user.Preferences;
@ -110,7 +111,7 @@ public class WalletsSetup {
BisqEnvironment bisqEnvironment,
BitcoinNodes bitcoinNodes,
@Named(BtcOptionKeys.USER_AGENT) String userAgent,
@Named(BtcOptionKeys.WALLET_DIR) File appDir,
@Named(AppOptionKeys.APP_DATA_DIR_KEY) File appDir,
@Named(BtcOptionKeys.USE_ALL_PROVIDED_NODES) String useAllProvidedNodes,
@Named(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC) String numConnectionForBtc,
@Named(BtcOptionKeys.SOCKS5_DISCOVER_MODE) String socks5DiscoverModeString) {

View file

@ -100,7 +100,6 @@ public class MonitorEnvironment extends BisqEnvironment {
setProperty(BtcOptionKeys.BTC_NODES, btcNodes);
setProperty(BtcOptionKeys.USE_TOR_FOR_BTC, useTorForBtc);
setProperty(BtcOptionKeys.WALLET_DIR, btcNetworkDir);
setProperty(BtcOptionKeys.USER_AGENT, userAgent);
setProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES, useAllProvidedNodes);
setProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC, numConnectionForBtc);