Browse Source

add minimum fee rates source of static 1 sat/vb for all block targets

terminal
Craig Raw 3 years ago
parent
commit
1b61a78e6d
  1. 11
      src/main/java/com/sparrowwallet/sparrow/net/FeeRatesSource.java
  2. 1
      src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml
  3. 2
      src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml

11
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<Integer, Double> getBlockTargetFeeRates(Map<Integer, Double> defaultblockTargetFeeRates) {
Map<Integer, Double> blockTargetFeeRates = new LinkedHashMap<>();
for(Integer blockTarget : defaultblockTargetFeeRates.keySet()) {
blockTargetFeeRates.put(blockTarget, 1.0);
}
return blockTargetFeeRates;
}
};
private static final Logger log = LoggerFactory.getLogger(FeeRatesSource.class);

1
src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml

@ -49,6 +49,7 @@
<FeeRatesSource fx:constant="ELECTRUM_SERVER" />
<FeeRatesSource fx:constant="MEMPOOL_SPACE" />
<FeeRatesSource fx:constant="BITCOINFEES_EARN_COM" />
<FeeRatesSource fx:constant="MINIMUM" />
</FXCollections>
</items>
</ComboBox>

2
src/main/resources/com/sparrowwallet/sparrow/soroban/initiator.fxml

@ -42,7 +42,7 @@
<center>
<VBox spacing="15">
<HBox styleClass="field-box">
<Label text="Payment code or PayNym:" styleClass="field-label" />
<Label text="PayNym or Payment code:" styleClass="field-label" />
<HBox>
<StackPane>
<ComboBox fx:id="payNymFollowers" />

Loading…
Cancel
Save