@@ -122,14 +122,15 @@ void WalletView::setClientModel(ClientModel *_clientModel)
122
122
123
123
overviewPage->setClientModel (_clientModel);
124
124
sendCoinsPage->setClientModel (_clientModel);
125
- if (walletModel) walletModel->setClientModel (_clientModel);
125
+ walletModel->setClientModel (_clientModel);
126
126
}
127
127
128
128
void WalletView::processNewTransaction (const QModelIndex& parent, int start, int /* end*/ )
129
129
{
130
130
// Prevent balloon-spam when initial block download is in progress
131
- if (!walletModel || ! clientModel || clientModel->node ().isInitialBlockDownload ())
131
+ if (!clientModel || clientModel->node ().isInitialBlockDownload ()) {
132
132
return ;
133
+ }
133
134
134
135
TransactionTableModel *ttm = walletModel->getTransactionTableModel ();
135
136
if (!ttm || ttm->processingQueuedTransactions ())
@@ -204,8 +205,6 @@ void WalletView::showOutOfSyncWarning(bool fShow)
204
205
205
206
void WalletView::encryptWallet ()
206
207
{
207
- if (!walletModel)
208
- return ;
209
208
AskPassphraseDialog dlg (AskPassphraseDialog::Encrypt, this );
210
209
dlg.setModel (walletModel);
211
210
dlg.exec ();
@@ -242,8 +241,6 @@ void WalletView::changePassphrase()
242
241
243
242
void WalletView::unlockWallet ()
244
243
{
245
- if (!walletModel)
246
- return ;
247
244
// Unlock wallet when requested by wallet model
248
245
if (walletModel->getEncryptionStatus () == WalletModel::Locked)
249
246
{
@@ -255,17 +252,11 @@ void WalletView::unlockWallet()
255
252
256
253
void WalletView::usedSendingAddresses ()
257
254
{
258
- if (!walletModel)
259
- return ;
260
-
261
255
GUIUtil::bringToFront (usedSendingAddressesPage);
262
256
}
263
257
264
258
void WalletView::usedReceivingAddresses ()
265
259
{
266
- if (!walletModel)
267
- return ;
268
-
269
260
GUIUtil::bringToFront (usedReceivingAddressesPage);
270
261
}
271
262
0 commit comments