From 2b8fc3900a9a12d766fe4d877004d718d013a73b Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 6 Oct 2023 13:50:44 +0200 Subject: [PATCH] followup --- src/main/java/com/sparrowwallet/sparrow/io/Krux.java | 2 +- .../sparrowwallet/sparrow/wallet/SettingsController.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Krux.java b/src/main/java/com/sparrowwallet/sparrow/io/Krux.java index 42ac3502..ddb4e2b2 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Krux.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Krux.java @@ -10,7 +10,7 @@ public class Krux extends SpecterDIY { @Override public String getKeystoreImportDescription(int account) { - return "Import QR created on your Krux by selecting Extended Public Key from the main menu once you have loaded your mnemonic."; + return "Import file or QR created on your Krux by selecting Extended Public Key from the main menu once you have loaded your mnemonic."; } @Override diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsController.java index 7d5debbd..716caf7e 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SettingsController.java @@ -99,7 +99,7 @@ public class SettingsController extends WalletFormController implements Initiali private boolean initialising = true; private boolean reverting; - private boolean ignoreScriptTypeChange; + private boolean replacing; @Override public void initialize(URL location, ResourceBundle resources) { @@ -146,7 +146,7 @@ public class SettingsController extends WalletFormController implements Initiali scriptType.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { if(newValue != null) { - if(oldValue != null && !ignoreScriptTypeChange && !reverting && walletForm.getWallet().getKeystores().stream().anyMatch(keystore -> keystore.getExtendedPublicKey() != null)) { + if(oldValue != null && !replacing && !reverting && walletForm.getWallet().getKeystores().stream().anyMatch(keystore -> keystore.getExtendedPublicKey() != null)) { Optional optType = showWarningDialog("Clear keystores?", "You are changing the script type on a wallet with existing key information. Usually this means the keys need to be re-imported using a different derivation path.\n\n" + "Do you want to clear the current key information?", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL); @@ -472,9 +472,9 @@ public class SettingsController extends WalletFormController implements Initiali totalKeystores.setValue(0); walletForm.setWallet(editedWallet); initialising = true; - ignoreScriptTypeChange = true; + replacing = true; setFieldsFromWallet(editedWallet); - ignoreScriptTypeChange = false; + replacing = false; initialising = false; EventManager.get().post(new SettingsChangedEvent(editedWallet, SettingsChangedEvent.Type.POLICY));