Skip to content

Commit

Permalink
[GUI] Cold staking, always update staking total amount
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Dec 5, 2019
1 parent 6bf8770 commit fe4a9b0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/qt/pivx/coldstakingwidget.cpp
Expand Up @@ -254,13 +254,11 @@ void ColdStakingWidget::onDelegationsRefreshed() {
isLoading = false;
bool hasDel = csModel->rowCount() > 0;

// Try to update the total value.
if (hasDel) {
CAmount total = csModel->getTotalAmount();
ui->labelStakingTotal->setText(tr("Total Staking: %1").arg(
(total == 0) ? "0.00 PIV" : GUIUtil::formatBalance(total, nDisplayUnit))
);
}
// Update the total value.
CAmount total = csModel->getTotalAmount();
ui->labelStakingTotal->setText(tr("Total Staking: %1").arg(
(total == 0) ? "0.00 PIV" : GUIUtil::formatBalance(total, nDisplayUnit))
);

// Update list if we are showing that section.
if (!isInDelegation) {
Expand Down Expand Up @@ -355,7 +353,7 @@ void ColdStakingWidget::onDelegateSelected(bool delegate){
menuAddresses->hide();
}

if(delegate){
if(isInDelegation){
ui->btnCoinControl->setVisible(true);
ui->containerSend->setVisible(true);
ui->containerBtn->setVisible(true);
Expand Down

0 comments on commit fe4a9b0

Please sign in to comment.