diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 2ff5c1bdf3..e82173fe15 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -365,35 +365,29 @@ void OverviewPage::updateDarksendProgress()
QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
ui->darksendProgress->setToolTip(strToolPip);
- QString strSettings;
+ QString strAmountAndRounds;
+ int nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
+ QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
- .arg(BitcoinUnits::formatWithUnit(
- walletModel->getOptionsModel()->getDisplayUnit(),
- nAnonymizeDarkcoinAmount * COIN
- )));
- strSettings = BitcoinUnits::formatWithUnit(
- walletModel->getOptionsModel()->getDisplayUnit(),
- nAnonymizeDarkcoinAmount * COIN
- ) + " / " + tr("%n Rounds", "", nDarksendRounds);
+ .arg(strAnonymizeDarkcoinAmount));
+ strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+ strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
} else {
- ui->labelAmountRounds->setToolTip(tr("Not enough compatible inputs to anonymize %1,
"
+ QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways);
+ ui->labelAmountRounds->setToolTip("" +
+ tr("Not enough compatible inputs to anonymize %1,
"
"will anonymize %2 instead")
- .arg(BitcoinUnits::formatWithUnit(
- walletModel->getOptionsModel()->getDisplayUnit(),
- nAnonymizeDarkcoinAmount * COIN
- ))
- .arg(BitcoinUnits::formatWithUnit(
- walletModel->getOptionsModel()->getDisplayUnit(),
- nMaxToAnonymize
- )));
- strSettings = "" + BitcoinUnits::formatWithUnit(
- walletModel->getOptionsModel()->getDisplayUnit(),
- nMaxToAnonymize
- ) + " / " + tr("%n Rounds", "", nDarksendRounds) + "";
+ .arg(strAnonymizeDarkcoinAmount)
+ .arg(strMaxToAnonymize) +
+ "");
+ strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+ strAmountAndRounds = "" +
+ QString(BitcoinUnits::factor(nDisplayUnit) == 1 ? "" : "~") + strMaxToAnonymize +
+ " / " + tr("%n Rounds", "", nDarksendRounds) + "";
}
- ui->labelAmountRounds->setText(strSettings);
+ ui->labelAmountRounds->setText(strAmountAndRounds);
}