mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
remove display of median fee rate where fee rates source is set to server
This commit is contained in:
parent
250bc84060
commit
45d2dee764
1 changed files with 4 additions and 4 deletions
|
|
@ -26,7 +26,7 @@ public class BlockCube extends Group {
|
||||||
public static final double CUBE_SIZE = 60;
|
public static final double CUBE_SIZE = 60;
|
||||||
|
|
||||||
private final IntegerProperty weightProperty = new SimpleIntegerProperty(0);
|
private final IntegerProperty weightProperty = new SimpleIntegerProperty(0);
|
||||||
private final DoubleProperty medianFeeProperty = new SimpleDoubleProperty(-1.0d);
|
private final DoubleProperty medianFeeProperty = new SimpleDoubleProperty(-Double.MAX_VALUE);
|
||||||
private final IntegerProperty heightProperty = new SimpleIntegerProperty(0);
|
private final IntegerProperty heightProperty = new SimpleIntegerProperty(0);
|
||||||
private final IntegerProperty txCountProperty = new SimpleIntegerProperty(0);
|
private final IntegerProperty txCountProperty = new SimpleIntegerProperty(0);
|
||||||
private final LongProperty timestampProperty = new SimpleLongProperty(System.currentTimeMillis());
|
private final LongProperty timestampProperty = new SimpleLongProperty(System.currentTimeMillis());
|
||||||
|
|
@ -54,8 +54,8 @@ public class BlockCube extends Group {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.medianFeeProperty.addListener((_, _, newValue) -> {
|
this.medianFeeProperty.addListener((_, _, newValue) -> {
|
||||||
medianFeeText.setText("~" + Math.round(Math.max(newValue.doubleValue(), 1.0d)));
|
medianFeeText.setText(newValue.doubleValue() < 0.0d ? "" : "~" + Math.round(Math.max(newValue.doubleValue(), 1.0d)));
|
||||||
unitsText.setText(" s/vb");
|
unitsText.setText(newValue.doubleValue() < 0.0d ? "" : " s/vb");
|
||||||
double unitsWidth = TextUtils.computeTextWidth(unitsText.getFont(), unitsText.getText(), 0.0d);
|
double unitsWidth = TextUtils.computeTextWidth(unitsText.getFont(), unitsText.getText(), 0.0d);
|
||||||
medianFeeTextFlow.setTranslateX((CUBE_SIZE - (medianFeeText.getLayoutBounds().getWidth() + unitsWidth)) / 2);
|
medianFeeTextFlow.setTranslateX((CUBE_SIZE - (medianFeeText.getLayoutBounds().getWidth() + unitsWidth)) / 2);
|
||||||
});
|
});
|
||||||
|
|
@ -325,7 +325,7 @@ public class BlockCube extends Group {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BlockCube fromBlockSummary(BlockSummary blockSummary) {
|
public static BlockCube fromBlockSummary(BlockSummary blockSummary) {
|
||||||
return new BlockCube(blockSummary.getWeight().orElse(0), blockSummary.getMedianFee().orElse(1.0d), blockSummary.getHeight(),
|
return new BlockCube(blockSummary.getWeight().orElse(0), blockSummary.getMedianFee().orElse(-1.0d), blockSummary.getHeight(),
|
||||||
blockSummary.getTransactionCount().orElse(0), blockSummary.getTimestamp().getTime(), true);
|
blockSummary.getTransactionCount().orElse(0), blockSummary.getTimestamp().getTime(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue