mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
add minimum fee rates source of static 1 sat/vb for all block targets
This commit is contained in:
parent
1defe51fd7
commit
1b61a78e6d
3 changed files with 13 additions and 1 deletions
|
@ -35,6 +35,17 @@ public enum FeeRatesSource {
|
||||||
String url = "https://bitcoinfees.earn.com/api/v1/fees/recommended";
|
String url = "https://bitcoinfees.earn.com/api/v1/fees/recommended";
|
||||||
return getThreeTierFeeRates(defaultblockTargetFeeRates, url);
|
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);
|
private static final Logger log = LoggerFactory.getLogger(FeeRatesSource.class);
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<FeeRatesSource fx:constant="ELECTRUM_SERVER" />
|
<FeeRatesSource fx:constant="ELECTRUM_SERVER" />
|
||||||
<FeeRatesSource fx:constant="MEMPOOL_SPACE" />
|
<FeeRatesSource fx:constant="MEMPOOL_SPACE" />
|
||||||
<FeeRatesSource fx:constant="BITCOINFEES_EARN_COM" />
|
<FeeRatesSource fx:constant="BITCOINFEES_EARN_COM" />
|
||||||
|
<FeeRatesSource fx:constant="MINIMUM" />
|
||||||
</FXCollections>
|
</FXCollections>
|
||||||
</items>
|
</items>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<center>
|
<center>
|
||||||
<VBox spacing="15">
|
<VBox spacing="15">
|
||||||
<HBox styleClass="field-box">
|
<HBox styleClass="field-box">
|
||||||
<Label text="Payment code or PayNym:" styleClass="field-label" />
|
<Label text="PayNym or Payment code:" styleClass="field-label" />
|
||||||
<HBox>
|
<HBox>
|
||||||
<StackPane>
|
<StackPane>
|
||||||
<ComboBox fx:id="payNymFollowers" />
|
<ComboBox fx:id="payNymFollowers" />
|
||||||
|
|
Loading…
Reference in a new issue