aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletview.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-07 18:13:27 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-26 16:28:00 +0300
commitca0e680bdcaa816c53355777d788a4c8478bb117 (patch)
tree0f79b8a2ba5493e2b60c98f8da435e0c0bbc9382 /src/qt/walletview.cpp
parent404373bc6ac0589e9e28690c9d09114d626a3dc3 (diff)
qt, refactor: Drop redundant checks of walletModel
The walletModel member is set in the WalletView constructor now.
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r--src/qt/walletview.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 9a0042024d..309806a1c4 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -122,14 +122,15 @@ void WalletView::setClientModel(ClientModel *_clientModel)
overviewPage->setClientModel(_clientModel);
sendCoinsPage->setClientModel(_clientModel);
- if (walletModel) walletModel->setClientModel(_clientModel);
+ walletModel->setClientModel(_clientModel);
}
void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
{
// Prevent balloon-spam when initial block download is in progress
- if (!walletModel || !clientModel || clientModel->node().isInitialBlockDownload())
+ if (!clientModel || clientModel->node().isInitialBlockDownload()) {
return;
+ }
TransactionTableModel *ttm = walletModel->getTransactionTableModel();
if (!ttm || ttm->processingQueuedTransactions())
@@ -204,8 +205,6 @@ void WalletView::showOutOfSyncWarning(bool fShow)
void WalletView::encryptWallet()
{
- if(!walletModel)
- return;
AskPassphraseDialog dlg(AskPassphraseDialog::Encrypt, this);
dlg.setModel(walletModel);
dlg.exec();
@@ -242,8 +241,6 @@ void WalletView::changePassphrase()
void WalletView::unlockWallet()
{
- if(!walletModel)
- return;
// Unlock wallet when requested by wallet model
if (walletModel->getEncryptionStatus() == WalletModel::Locked)
{
@@ -255,17 +252,11 @@ void WalletView::unlockWallet()
void WalletView::usedSendingAddresses()
{
- if(!walletModel)
- return;
-
GUIUtil::bringToFront(usedSendingAddressesPage);
}
void WalletView::usedReceivingAddresses()
{
- if(!walletModel)
- return;
-
GUIUtil::bringToFront(usedReceivingAddressesPage);
}