Skip to content

Commit

Permalink
use feeService.getFeeTextForDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
chimp1984 committed Nov 9, 2020
1 parent 9f67cef commit f8462fd
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions core/src/main/java/bisq/core/app/WalletAppSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,26 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
(downloadPercentage, chainHeight, feeUpdate, exception) -> {
String result;
if (exception == null) {
//todo feeService.getFeeTextForDisplay()
/*
result = Res.get("mainView.footer.btcInfo",
Res.get("mainView.footer.btcInfo.synchronizedWith"),
getBtcNetworkAsString(),
feeService.getFeeTextForDisplay());
*/
double percentage = (double) downloadPercentage;
long fees = feeService.getTxFeePerByte().longValue();
btcSyncProgress.set(percentage);
int bestChainHeight = walletsSetup.getChain() != null ? walletsSetup.getChain().getBestChainHeight() : 0;
String chainHeightAsString = bestChainHeight > 0 ? String.valueOf(bestChainHeight) : "";
int bestChainHeight = walletsSetup.getChain() != null ?
walletsSetup.getChain().getBestChainHeight() :
0;
String chainHeightAsString = bestChainHeight > 0 ?
String.valueOf(bestChainHeight) :
"";
if (percentage == 1) {
String feeRate = Res.get("mainView.footer.btcFeeRate", fees);
String synchronizedWith = Res.get("mainView.footer.btcInfo.synchronizedWith",
getBtcNetworkAsString(), chainHeightAsString);
result = Res.get("mainView.footer.btcInfo", synchronizedWith, feeRate);
result = Res.get("mainView.footer.btcInfo", synchronizedWith,
feeService.getFeeTextForDisplay());
getBtcSplashSyncIconId().set("image-connection-synced");

downloadCompleteHandler.run();
} else if (percentage > 0.0) {
String synchronizingWith = Res.get("mainView.footer.btcInfo.synchronizingWith",
getBtcNetworkAsString(), chainHeightAsString, FormattingUtils.formatToPercentWithSymbol(percentage));
getBtcNetworkAsString(), chainHeightAsString,
FormattingUtils.formatToPercentWithSymbol(percentage));
result = Res.get("mainView.footer.btcInfo", synchronizingWith, "");
} else {
result = Res.get("mainView.footer.btcInfo",
Expand Down

0 comments on commit f8462fd

Please sign in to comment.