From 1b61a78e6d120dc86ed1cc8747e1b893addcd16a Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 7 Dec 2021 10:26:33 +0200 Subject: [PATCH] add minimum fee rates source of static 1 sat/vb for all block targets --- .../com/sparrowwallet/sparrow/net/FeeRatesSource.java | 11 +++++++++++ .../sparrowwallet/sparrow/preferences/general.fxml | 1 + .../com/sparrowwallet/sparrow/soroban/initiator.fxml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/net/FeeRatesSource.java b/src/main/java/com/sparrowwallet/sparrow/net/FeeRatesSource.java index f359ca29..34548951 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/FeeRatesSource.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/FeeRatesSource.java @@ -35,6 +35,17 @@ public enum FeeRatesSource { String url = "https://bitcoinfees.earn.com/api/v1/fees/recommended"; return getThreeTierFeeRates(defaultblockTargetFeeRates, url); } + }, + MINIMUM("Minimum (1 sat/vB)") { + @Override + public Map getBlockTargetFeeRates(Map defaultblockTargetFeeRates) { + Map blockTargetFeeRates = new LinkedHashMap<>(); + for(Integer blockTarget : defaultblockTargetFeeRates.keySet()) { + blockTargetFeeRates.put(blockTarget, 1.0); + } + + return blockTargetFeeRates; + } }; private static final Logger log = LoggerFactory.getLogger(FeeRatesSource.class); diff --git a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml index c235a9c4..ade1d3e3 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml @@ -49,6 +49,7 @@ + diff --git a/src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml b/src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml index 2a5b9acd..0f8e68c5 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml @@ -42,7 +42,7 @@
-