Remove illegal / characters from output descriptors

This commit is contained in:
Craig Raw 2020-11-02 07:49:55 +02:00
parent 389ce2180d
commit 13a486597c

View file

@ -261,7 +261,7 @@ public class SettingsController extends WalletFormController implements Initiali
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)) {
try { try {
OutputDescriptor editedOutputDescriptor = OutputDescriptor.getOutputDescriptor(text.get()); OutputDescriptor editedOutputDescriptor = OutputDescriptor.getOutputDescriptor(text.get().trim().replace("\\", ""));
Wallet editedWallet = editedOutputDescriptor.toWallet(); Wallet editedWallet = editedOutputDescriptor.toWallet();
editedWallet.setName(getWalletForm().getWallet().getName()); editedWallet.setName(getWalletForm().getWallet().getName());