From e0b653027510b5631748bd36f3fb3a7da64d9cf9 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 5 May 2021 11:34:45 +0200 Subject: [PATCH] only save tmp backup wallet if connected --- .../sparrowwallet/sparrow/wallet/SettingsWalletForm.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsWalletForm.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsWalletForm.java index 13cc132d..18fe7574 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsWalletForm.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsWalletForm.java @@ -3,6 +3,7 @@ package com.sparrowwallet.sparrow.wallet; import com.sparrowwallet.drongo.policy.Policy; import com.sparrowwallet.drongo.wallet.Keystore; import com.sparrowwallet.drongo.wallet.Wallet; +import com.sparrowwallet.sparrow.AppServices; import com.sparrowwallet.sparrow.EventManager; import com.sparrowwallet.sparrow.event.WalletAddressesChangedEvent; import com.sparrowwallet.sparrow.event.WalletSettingsChangedEvent; @@ -46,7 +47,10 @@ public class SettingsWalletForm extends WalletForm { if(refreshAll) { pastWallet = wallet.copy(); save(); //Save here for the temp backup in case password has been changed - getStorage().backupTempWallet(); + if(AppServices.isConnected()) { + getStorage().backupTempWallet(); + } + walletCopy.clearNodes(); }