mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-08 03:49:38 +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) {
|
||||
wallet.save();
|
||||
if (backup) backupWallet(getWalletName(wallet.getPath()));
|
||||
wallet.save();
|
||||
}
|
||||
|
||||
public void closeWallet(MoneroWallet wallet, boolean save) {
|
||||
|
@ -385,8 +385,8 @@ public class XmrWalletService extends XmrWalletBase {
|
|||
MoneroError err = null;
|
||||
String path = wallet.getPath();
|
||||
try {
|
||||
wallet.close(save);
|
||||
if (save) backupWallet(getWalletName(path));
|
||||
if (save) saveWallet(wallet, true);
|
||||
wallet.close();
|
||||
} catch (MoneroError e) {
|
||||
err = e;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue