Skip to content

Commit

Permalink
minor fixes balances tab
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoForge committed Dec 2, 2020
1 parent 4c31b86 commit b0ff11d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ void MainWindow::setupBalancesTab() {
}

// And switch to the send tab.
ui->tabWidget->setCurrentIndex(1);
ui->tabWidget->setCurrentIndex(2);
};

// Double click opens up memo if one exists
Expand Down
10 changes: 5 additions & 5 deletions src/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1127,11 +1127,11 @@ void RPC::refreshGetAllData() {
newAddressBalance.immature = QString::number(it.value()["immature"].get<double>(),'f', 8);
newAddressBalance.locked = QString::number(it.value()["locked"].get<double>(),'f', 8);
newAddressBalance.watch = QString::number(it.value()["spendable"].get<json::boolean_t>());
long totalBalance = newAddressBalance.confirmed.toDouble() * 1e08;
totalBalance += newAddressBalance.unconfirmed.toDouble() * 1e08;
totalBalance += newAddressBalance.immature.toDouble() * 1e08;
totalBalance += newAddressBalance.locked.toDouble() * 1e08;
if (totalBalance > 0) {
double totalBalance = it.value()["amount"].get<double>();
totalBalance += it.value()["unconfirmed"].get<double>();
totalBalance += it.value()["immature"].get<double>();
totalBalance += it.value()["locked"].get<double>();
if (totalBalance > 0.0) {
newAddressBalances->append(newAddressBalance);
}
}
Expand Down

0 comments on commit b0ff11d

Please sign in to comment.