|
@ -14,8 +14,6 @@ import javafx.collections.FXCollections; |
|
|
import javafx.fxml.FXML; |
|
|
import javafx.fxml.FXML; |
|
|
import javafx.fxml.Initializable; |
|
|
import javafx.fxml.Initializable; |
|
|
import javafx.scene.control.ComboBox; |
|
|
import javafx.scene.control.ComboBox; |
|
|
import javafx.scene.control.Spinner; |
|
|
|
|
|
import javafx.scene.control.SpinnerValueFactory; |
|
|
|
|
|
import javafx.util.StringConverter; |
|
|
import javafx.util.StringConverter; |
|
|
|
|
|
|
|
|
import java.net.URL; |
|
|
import java.net.URL; |
|
@ -25,6 +23,8 @@ import java.util.NoSuchElementException; |
|
|
import java.util.ResourceBundle; |
|
|
import java.util.ResourceBundle; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
import static com.sparrowwallet.drongo.wallet.StandardAccount.*; |
|
|
|
|
|
|
|
|
public class MixToController implements Initializable { |
|
|
public class MixToController implements Initializable { |
|
|
private static final Wallet NONE_WALLET = new Wallet("None"); |
|
|
private static final Wallet NONE_WALLET = new Wallet("None"); |
|
|
|
|
|
|
|
@ -53,7 +53,7 @@ public class MixToController implements Initializable { |
|
|
List<Wallet> destinationWallets = AppServices.get().getOpenWallets().keySet().stream().filter(openWallet -> openWallet.isValid() |
|
|
List<Wallet> destinationWallets = AppServices.get().getOpenWallets().keySet().stream().filter(openWallet -> openWallet.isValid() |
|
|
&& (openWallet.getScriptType() == ScriptType.P2WPKH || openWallet.getScriptType() == ScriptType.P2WSH) |
|
|
&& (openWallet.getScriptType() == ScriptType.P2WPKH || openWallet.getScriptType() == ScriptType.P2WSH) |
|
|
&& openWallet != wallet && openWallet != wallet.getMasterWallet() |
|
|
&& openWallet != wallet && openWallet != wallet.getMasterWallet() |
|
|
&& (openWallet.getStandardAccountType() == null || !StandardAccount.WHIRLPOOL_ACCOUNTS.contains(openWallet.getStandardAccountType()))).collect(Collectors.toList()); |
|
|
&& (openWallet.getStandardAccountType() == null || !List.of(WHIRLPOOL_PREMIX, WHIRLPOOL_BADBANK).contains(openWallet.getStandardAccountType()))).collect(Collectors.toList()); |
|
|
allWallets.addAll(destinationWallets); |
|
|
allWallets.addAll(destinationWallets); |
|
|
|
|
|
|
|
|
mixToWallets.setItems(FXCollections.observableList(allWallets)); |
|
|
mixToWallets.setItems(FXCollections.observableList(allWallets)); |
|
|