From bdf10b55a8b481827131d3211aa2ac5949ee1f2d Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Sun, 8 Nov 2020 08:19:56 -0600 Subject: [PATCH] Resolve merge conflict in core/src/main/java/bisq/core/app/WalletAppSetup.java --- core/src/main/java/bisq/core/app/WalletAppSetup.java | 11 +++++------ .../main/java/bisq/core/provider/fee/FeeService.java | 8 ++++++++ .../src/main/resources/i18n/displayStrings.properties | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/bisq/core/app/WalletAppSetup.java b/core/src/main/java/bisq/core/app/WalletAppSetup.java index 3c400548df..61433278e1 100644 --- a/core/src/main/java/bisq/core/app/WalletAppSetup.java +++ b/core/src/main/java/bisq/core/app/WalletAppSetup.java @@ -22,8 +22,8 @@ import bisq.core.btc.exceptions.RejectedTxException; import bisq.core.btc.setup.WalletsSetup; import bisq.core.btc.wallet.WalletsManager; import bisq.core.locale.Res; -import bisq.core.provider.fee.FeeService; import bisq.core.offer.OpenOfferManager; +import bisq.core.provider.fee.FeeService; import bisq.core.trade.TradeManager; import bisq.core.user.Preferences; import bisq.core.util.FormattingUtils; @@ -117,24 +117,23 @@ public class WalletAppSetup { String result; if (exception == null) { double percentage = (double) downloadPercentage; - long fees = feeService.getTxFeePerVbyte().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", diff --git a/core/src/main/java/bisq/core/provider/fee/FeeService.java b/core/src/main/java/bisq/core/provider/fee/FeeService.java index 8e5ddfaf0a..78a3c640be 100644 --- a/core/src/main/java/bisq/core/provider/fee/FeeService.java +++ b/core/src/main/java/bisq/core/provider/fee/FeeService.java @@ -20,6 +20,7 @@ package bisq.core.provider.fee; 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; @@ -190,4 +191,11 @@ public class FeeService { 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", txFeePerVbyte); + return ""; + } } diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 62ab1ea91a..e8993b2e6f 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -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