diff --git a/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java b/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java index eb86bd7aed..10924411ae 100644 --- a/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java +++ b/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java @@ -40,7 +40,7 @@ import java.util.List; @Singleton public class CoreMoneroNodeService { - public static final String MONEROD_DIR = Config.appDataDir().getAbsolutePath(); + public static final String MONEROD_DIR = Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_LOCAL ? System.getProperty("user.dir") + File.separator + ".localnet" : Config.appDataDir().getAbsolutePath(); public static final String MONEROD_NAME = Utilities.isWindows() ? "monerod.exe" : "monerod"; public static final String MONEROD_PATH = MONEROD_DIR + File.separator + MONEROD_NAME; private static final String MONEROD_DATADIR = Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_LOCAL ? MONEROD_DIR + File.separator + Config.baseCurrencyNetwork().toString().toLowerCase() + File.separator + "node1" : null; // use default directory unless local diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 08afa43fbc..a836f62c6b 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -86,7 +86,7 @@ public class XmrWalletService { public static final int NUM_BLOCKS_UNLOCK = 10; private static final MoneroNetworkType MONERO_NETWORK_TYPE = getMoneroNetworkType(); private static final MoneroWalletRpcManager MONERO_WALLET_RPC_MANAGER = new MoneroWalletRpcManager(); - public static final String MONERO_WALLET_RPC_DIR = Config.appDataDir().getAbsolutePath(); + public static final String MONERO_WALLET_RPC_DIR = Config.baseCurrencyNetwork().isTestnet() ? System.getProperty("user.dir") + File.separator + ".localnet" : Config.appDataDir().getAbsolutePath(); // .localnet contains monero-wallet-rpc and wallet files public static final String MONERO_WALLET_RPC_NAME = Utilities.isWindows() ? "monero-wallet-rpc.exe" : "monero-wallet-rpc"; public static final String MONERO_WALLET_RPC_PATH = MONERO_WALLET_RPC_DIR + File.separator + MONERO_WALLET_RPC_NAME; private static final String MONERO_WALLET_RPC_USERNAME = "haveno_user";