indicate output descriptor key expressions are shown in canonical order

This commit is contained in:
Craig Raw 2022-01-05 13:14:41 +02:00
parent f1b3f7d5dd
commit a76d9dba21

View file

@ -381,7 +381,8 @@ public class SettingsController extends WalletFormController implements Initiali
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString); TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString);
dialog.setTitle("Edit wallet output descriptor"); dialog.setTitle("Edit wallet output descriptor");
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nChanges to the output descriptor will modify the wallet configuration."); dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nChanges to the output descriptor will modify the wallet configuration." +
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
Optional<String> text = dialog.showAndWait(); Optional<String> text = dialog.showAndWait();
if(text.isPresent() && !text.get().isEmpty() && !text.get().equals(outputDescriptorString)) { if(text.isPresent() && !text.get().isEmpty() && !text.get().equals(outputDescriptorString)) {
setDescriptorText(text.get()); setDescriptorText(text.get());
@ -413,7 +414,8 @@ public class SettingsController extends WalletFormController implements Initiali
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString, false); TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString, false);
dialog.setTitle("Show wallet output descriptor"); dialog.setTitle("Show wallet output descriptor");
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nThis wallet is no longer editable - create a new wallet to change the descriptor."); dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nThis wallet is no longer editable - create a new wallet to change the descriptor." +
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
dialog.showAndWait(); dialog.showAndWait();
} }