DS: Adjust Target Balance

- When targeting the entire balance, the wallet reports getting stuck at 99%.
This commit is contained in:
Evan Duffield 2015-04-08 07:41:49 -07:00
parent cd4b13d86d
commit 7d5948012b

View File

@ -300,6 +300,7 @@ void OverviewPage::updateDarksendProgress()
{
denomPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / denominatedBalance;
denomPart = denomPart > 1 ? 1 : denomPart;
if(denomPart == 1) nMaxToAnonymize = denominatedBalance;
}
// % of fully anonymized balance
@ -313,7 +314,7 @@ void OverviewPage::updateDarksendProgress()
// apply some weights to them (sum should be <=100) and calculate the whole progress
int progress = 80 * denomPart + 20 * anonPart;
if(progress > 100) progress = 100;
if(progress >= 100) progress = 100;
ui->darksendProgress->setValue(progress);