From 72b15967cc983b51a92599deec8de7e97db1d5b8 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 3 Feb 2022 14:49:09 +0200 Subject: [PATCH] remove whirlpool child wallets from sweep to list --- .../sparrowwallet/sparrow/control/PrivateKeySweepDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/PrivateKeySweepDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/PrivateKeySweepDialog.java index 1b7506d5..13c8f1f3 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/PrivateKeySweepDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/PrivateKeySweepDialog.java @@ -43,6 +43,7 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; import static com.sparrowwallet.drongo.protocol.ScriptType.P2TR; @@ -122,7 +123,7 @@ public class PrivateKeySweepDialog extends Dialog { toAddress = new ComboBoxTextField(); toAddress.getStyleClass().add("fixed-width"); toWallet = new ComboBox<>(); - toWallet.setItems(FXCollections.observableList(new ArrayList<>(AppServices.get().getOpenWallets().keySet()))); + toWallet.setItems(FXCollections.observableList(AppServices.get().getOpenWallets().keySet().stream().filter(w -> !w.isWhirlpoolChildWallet()).collect(Collectors.toList()))); toAddress.setComboProperty(toWallet); toWallet.prefWidthProperty().bind(toAddress.widthProperty()); StackPane stackPane = new StackPane();