1
0

Upload manager changes

This commit is contained in:
Scott E. Graves
2017-02-20 15:38:18 -06:00
parent 0c90d3d116
commit 5db3f618bc
4 changed files with 28 additions and 5 deletions

View File

@@ -773,6 +773,7 @@ void CSiaDriveDlg::SetWalletUnlockPassword(const String& password)
bool CSiaDriveDlg::UpdateSiaInfo()
{
// TODO Needs to be async
const String serverVersion = _siaApi->GetServerVersion();
if (serverVersion.length())
{
@@ -806,7 +807,7 @@ bool CSiaDriveDlg::UpdateSiaInfo()
SetRenterTotalUsed(_siaApi->GetRenter()->GetTotalUsedBytes());
SiaCurrency t = _siaApi->GetRenter()->GetTotalUsedBytes() ? _siaApi->GetRenter()->GetTotalUsedBytes() / (1024.0 * 1024.0 * 1024.0) : 0.0;
auto a = (t / (allocatedFunds - unspentFunds) * allocatedFunds) * 1024.0;
auto a = (t / (allocatedFunds - unspentFunds)) * allocatedFunds;
SetRenterTotalAvailable(a.ToDouble());
SetRenterTotalRemain((a-t).ToDouble());
SetRenterTotalUploadProgress(_siaApi->GetRenter()->GetTotalUploadProgress());