From 5e3f31de30ba161902c97e8b5a20846e8b5eeb98 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 11 Jul 2023 10:07:00 +0200 Subject: [PATCH] followup --- .../java/com/sparrowwallet/sparrow/control/EntryCell.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java index cbfb0fa2..f0d34e01 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java @@ -248,7 +248,7 @@ public class EntryCell extends TreeTableCell implements Confirmati TransactionOutput changeOutput = new TransactionOutput(new Transaction(), 1L, transactionEntry.getWallet().getFreshNode(KeyPurpose.CHANGE).getOutputScript()); vSize += changeOutput.getLength(); } - int inputSize = tx.getInputs().get(0).getLength() + (tx.getInputs().get(0).hasWitness() ? tx.getInputs().get(0).getWitness().getLength() / Transaction.WITNESS_SCALE_FACTOR : 0); + double inputSize = tx.getInputs().get(0).getLength() + (tx.getInputs().get(0).hasWitness() ? (double)tx.getInputs().get(0).getWitness().getLength() / Transaction.WITNESS_SCALE_FACTOR : 0); List walletUtxos = new ArrayList<>(transactionEntry.getWallet().getSpendableUtxos(blockTransaction).keySet()); //Remove the UTXOs we are respending walletUtxos.removeAll(utxos); @@ -336,7 +336,7 @@ public class EntryCell extends TreeTableCell implements Confirmati private static Double getMaxFeeRate() { if(AppServices.getTargetBlockFeeRates() == null || AppServices.getTargetBlockFeeRates().isEmpty()) { - return 100.0; + return 1.0; } return AppServices.getTargetBlockFeeRates().values().iterator().next();