mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-09 01:29:26 +00:00
backup wallet files before saving
This commit is contained in:
parent
c1b17cf612
commit
0462ddc273
1 changed files with 3 additions and 3 deletions
|
@ -376,8 +376,8 @@ public class XmrWalletService extends XmrWalletBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveWallet(MoneroWallet wallet, boolean backup) {
|
public void saveWallet(MoneroWallet wallet, boolean backup) {
|
||||||
wallet.save();
|
|
||||||
if (backup) backupWallet(getWalletName(wallet.getPath()));
|
if (backup) backupWallet(getWalletName(wallet.getPath()));
|
||||||
|
wallet.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeWallet(MoneroWallet wallet, boolean save) {
|
public void closeWallet(MoneroWallet wallet, boolean save) {
|
||||||
|
@ -385,8 +385,8 @@ public class XmrWalletService extends XmrWalletBase {
|
||||||
MoneroError err = null;
|
MoneroError err = null;
|
||||||
String path = wallet.getPath();
|
String path = wallet.getPath();
|
||||||
try {
|
try {
|
||||||
wallet.close(save);
|
if (save) saveWallet(wallet, true);
|
||||||
if (save) backupWallet(getWalletName(path));
|
wallet.close();
|
||||||
} catch (MoneroError e) {
|
} catch (MoneroError e) {
|
||||||
err = e;
|
err = e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue