Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default fee rate from Bisq startup screen #4767

Merged
merged 1 commit into from Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions core/src/main/java/bisq/core/app/WalletAppSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,23 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
String result;
if (exception == null) {
double percentage = (double) downloadPercentage;
long fees = feeService.getTxFeePerByte().longValue();
btcSyncProgress.set(percentage);
if (percentage == 1) {
String feeRate = Res.get("mainView.footer.btcFeeRate", fees);
result = Res.get("mainView.footer.btcInfo",
Res.get("mainView.footer.btcInfo.synchronizedWith"),
getBtcNetworkAsString() + " / " + feeRate);
getBtcNetworkAsString(),
feeService.getFeeTextForDisplay());
getBtcSplashSyncIconId().set("image-connection-synced");

downloadCompleteHandler.run();
} else if (percentage > 0.0) {
result = Res.get("mainView.footer.btcInfo",
Res.get("mainView.footer.btcInfo.synchronizingWith"),
getBtcNetworkAsString() + ": " + FormattingUtils.formatToPercentWithSymbol(percentage));
getBtcNetworkAsString() + ": " + FormattingUtils.formatToPercentWithSymbol(percentage), "");
} else {
result = Res.get("mainView.footer.btcInfo",
Res.get("mainView.footer.btcInfo.connectingTo"),
getBtcNetworkAsString());
getBtcNetworkAsString(), "");
}
} else {
result = Res.get("mainView.footer.btcInfo",
Expand Down
8 changes: 8 additions & 0 deletions core/src/main/java/bisq/core/provider/fee/FeeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import bisq.core.dao.governance.param.Param;
import bisq.core.dao.governance.period.PeriodService;
import bisq.core.dao.state.DaoStateService;
import bisq.core.locale.Res;

import bisq.common.UserThread;
import bisq.common.config.Config;
Expand Down Expand Up @@ -190,4 +191,11 @@ public Coin getTxFeePerByte() {
public ReadOnlyIntegerProperty feeUpdateCounterProperty() {
return feeUpdateCounter;
}

public String getFeeTextForDisplay() {
// only show the fee rate if it has been initialized from the service (see feeUpdateCounter)
if (feeUpdateCounter.get() > 0)
return Res.get("mainView.footer.btcFeeRate", txFeePerByte);
return "";
}
}
4 changes: 2 additions & 2 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ mainView.balance.locked.short=Locked

mainView.footer.usingTor=(using Tor)
mainView.footer.localhostBitcoinNode=(localhost)
mainView.footer.btcInfo={0} {1}
mainView.footer.btcFeeRate=Current fee rate: {0} sat/vB
mainView.footer.btcInfo={0} {1} {2}
mainView.footer.btcFeeRate=/ Current fee rate: {0} sat/vB
mainView.footer.btcInfo.initializing=Connecting to Bitcoin network
mainView.footer.bsqInfo.synchronizing=/ Synchronizing DAO
mainView.footer.btcInfo.synchronizingWith=Synchronizing with
Expand Down