mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
backup monero wallet
This commit is contained in:
parent
dc2a5becf0
commit
aba3c1b82e
@ -348,7 +348,7 @@ public class WalletConfig extends AbstractIdleService {
|
|||||||
|
|
||||||
// XMR wallet
|
// XMR wallet
|
||||||
String xmrPrefix = "_XMR";
|
String xmrPrefix = "_XMR";
|
||||||
vXmrWalletFile = new File(directory, filePrefix + xmrPrefix); // TODO: *.wallet?
|
vXmrWalletFile = new File(directory, filePrefix + xmrPrefix);
|
||||||
if (MoneroUtils.walletExists(vXmrWalletFile.getPath())) {
|
if (MoneroUtils.walletExists(vXmrWalletFile.getPath())) {
|
||||||
vXmrWallet = openWallet(new MoneroWalletConfig().setPath(filePrefix + xmrPrefix).setPassword("abctesting123"));
|
vXmrWallet = openWallet(new MoneroWalletConfig().setPath(filePrefix + xmrPrefix).setPassword("abctesting123"));
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +131,7 @@ public class WalletsSetup {
|
|||||||
private final Config config;
|
private final Config config;
|
||||||
private final LocalBitcoinNode localBitcoinNode;
|
private final LocalBitcoinNode localBitcoinNode;
|
||||||
private final BtcNodes btcNodes;
|
private final BtcNodes btcNodes;
|
||||||
private final String btcWalletFileName;
|
private final String xmrWalletFileName;
|
||||||
private final int numConnectionsForBtc;
|
private final int numConnectionsForBtc;
|
||||||
private final String userAgent;
|
private final String userAgent;
|
||||||
private final NetworkParameters params;
|
private final NetworkParameters params;
|
||||||
@ -179,7 +179,7 @@ public class WalletsSetup {
|
|||||||
this.socks5DiscoverMode = evaluateMode(socks5DiscoverModeString);
|
this.socks5DiscoverMode = evaluateMode(socks5DiscoverModeString);
|
||||||
this.walletDir = walletDir;
|
this.walletDir = walletDir;
|
||||||
|
|
||||||
btcWalletFileName = "bisq_" + config.baseCurrencyNetwork.getCurrencyCode() + ".wallet";
|
xmrWalletFileName = "bisq_" + config.baseCurrencyNetwork.getCurrencyCode();
|
||||||
params = Config.baseCurrencyNetworkParameters();
|
params = Config.baseCurrencyNetworkParameters();
|
||||||
PeerGroup.setIgnoreHttpSeeds(true);
|
PeerGroup.setIgnoreHttpSeeds(true);
|
||||||
}
|
}
|
||||||
@ -424,7 +424,9 @@ public class WalletsSetup {
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public void backupWallets() {
|
public void backupWallets() {
|
||||||
FileUtil.rollingBackup(walletDir, btcWalletFileName, 20);
|
FileUtil.rollingBackup(walletDir, xmrWalletFileName, 20);
|
||||||
|
FileUtil.rollingBackup(walletDir, xmrWalletFileName + ".keys", 20);
|
||||||
|
FileUtil.rollingBackup(walletDir, xmrWalletFileName + ".address.txt", 20);
|
||||||
FileUtil.rollingBackup(walletDir, BSQ_WALLET_FILE_NAME, 20);
|
FileUtil.rollingBackup(walletDir, BSQ_WALLET_FILE_NAME, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user