From ddcb3e6f61357a7b06ec578beb8fefc8bacafdec Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 19 May 2022 15:53:47 +0200 Subject: [PATCH] raise minimum for min mixes before mixing out to 2 --- .../com/sparrowwallet/sparrow/control/UtxosTreeTable.java | 2 +- .../com/sparrowwallet/sparrow/wallet/MixToController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java index f934de65..de453023 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java @@ -25,7 +25,7 @@ public class UtxosTreeTable extends CoinTreeTable { }); dateCol.setCellFactory(p -> new DateCell()); dateCol.setSortable(true); - dateCol.setComparator(TableColumnBase.DEFAULT_COMPARATOR.reversed()); + dateCol.setComparator(dateCol.getComparator().reversed()); getColumns().add(dateCol); TreeTableColumn outputCol = new TreeTableColumn<>("Output"); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java index 7832bf2a..ae1b1564 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/MixToController.java @@ -95,9 +95,9 @@ public class MixToController implements Initializable { }); int initialMinMixes = mixConfig.getMinMixes() == null ? Whirlpool.DEFAULT_MIXTO_MIN_MIXES : mixConfig.getMinMixes(); - minMixes.setValueFactory(new IntegerSpinner.ValueFactory(1, 10000, initialMinMixes)); + minMixes.setValueFactory(new IntegerSpinner.ValueFactory(2, 10000, initialMinMixes)); minMixes.valueProperty().addListener((observable, oldValue, newValue) -> { - if(newValue == null || newValue < 1 || newValue > 10000) { + if(newValue == null || newValue < 2 || newValue > 10000) { return; }