mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
only save tmp backup wallet if connected
This commit is contained in:
parent
a0d3f3b745
commit
e0b6530275
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ package com.sparrowwallet.sparrow.wallet;
|
||||||
import com.sparrowwallet.drongo.policy.Policy;
|
import com.sparrowwallet.drongo.policy.Policy;
|
||||||
import com.sparrowwallet.drongo.wallet.Keystore;
|
import com.sparrowwallet.drongo.wallet.Keystore;
|
||||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||||
|
import com.sparrowwallet.sparrow.AppServices;
|
||||||
import com.sparrowwallet.sparrow.EventManager;
|
import com.sparrowwallet.sparrow.EventManager;
|
||||||
import com.sparrowwallet.sparrow.event.WalletAddressesChangedEvent;
|
import com.sparrowwallet.sparrow.event.WalletAddressesChangedEvent;
|
||||||
import com.sparrowwallet.sparrow.event.WalletSettingsChangedEvent;
|
import com.sparrowwallet.sparrow.event.WalletSettingsChangedEvent;
|
||||||
|
@ -46,7 +47,10 @@ public class SettingsWalletForm extends WalletForm {
|
||||||
if(refreshAll) {
|
if(refreshAll) {
|
||||||
pastWallet = wallet.copy();
|
pastWallet = wallet.copy();
|
||||||
save(); //Save here for the temp backup in case password has been changed
|
save(); //Save here for the temp backup in case password has been changed
|
||||||
getStorage().backupTempWallet();
|
if(AppServices.isConnected()) {
|
||||||
|
getStorage().backupTempWallet();
|
||||||
|
}
|
||||||
|
|
||||||
walletCopy.clearNodes();
|
walletCopy.clearNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue