diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 524b79c90..7135fb153 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -82,7 +82,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n labelEncryptionIcon(0), labelConnectionsIcon(0), labelBlocksIcon(0), - labelStakingIcon(0), progressBarLabel(0), progressBar(0), progressDialog(0), @@ -200,13 +199,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n labelConnectionsIcon = new QLabel(); labelBlocksIcon = new QLabel(); labelStakingIcon = new QLabel(); -// if (GetBoolArg("-staking", true)) -// { - QTimer *timerStakingIcon = new QTimer(labelStakingIcon); - connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon())); - timerStakingIcon->start(30 * 1000); - updateStakingIcon(); -// } if(enableWallet) { @@ -222,6 +214,15 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelBlocksIcon); frameBlocksLayout->addStretch(); + + if (GetBoolArg("-staking", true)) + { + QTimer *timerStakingIcon = new QTimer(labelStakingIcon); + connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon())); + timerStakingIcon->start(30 * 1000); + + updateStakingIcon(); + } // Progress bar and label for blocks download diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 0ce866549..1fb3da984 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -188,7 +188,6 @@ unsigned long long WalletFrame::updateWeight() WalletView *walletView = currentWalletView(); if (walletView) return walletView->updateWeight(); - return 0; } void WalletFrame::usedSendingAddresses() diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 637858ba9..0f964045a 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -680,15 +680,15 @@ bool WalletModel::saveReceiveRequest(const std::string &sAddress, const int64_t unsigned long long WalletModel::updateWeight() { if (!wallet) - return 0; + return; TRY_LOCK(cs_main, lockMain); if (!lockMain) - return 0; + return; TRY_LOCK(wallet->cs_wallet, lockWallet); if (!lockWallet) - return 0; + return; return wallet->GetStakeWeight(); } diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index f2845fa59..000edcc25 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -284,9 +284,8 @@ void WalletView::lockWallet() unsigned long long WalletView::updateWeight() { - if(!walletModel) - return 0; - return walletModel->updateWeight(); + if(walletModel) + return walletModel->updateWeight(); } void WalletView::usedSendingAddresses()