@@ -45,7 +45,6 @@ WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, ClientModel
4545 optionsModel(client_model.getOptionsModel()),
4646 timer(new QTimer(this ))
4747{
48- fHaveWatchOnly = false ;
4948 addressTableModel = new AddressTableModel (this );
5049 transactionTableModel = new TransactionTableModel (platformStyle, this );
5150 recentRequestsTableModel = new RecentRequestsTableModel (this );
@@ -141,12 +140,6 @@ void WalletModel::updateAddressBook(const QString &address, const QString &label
141140 addressTableModel->updateEntry (address, label, isMine, purpose, status);
142141}
143142
144- void WalletModel::updateWatchOnlyFlag (bool fHaveWatchonly )
145- {
146- fHaveWatchOnly = fHaveWatchonly ;
147- Q_EMIT notifyWatchonlyChanged (fHaveWatchonly );
148- }
149-
150143bool WalletModel::validateAddress (const QString& address) const
151144{
152145 return IsValidDestinationString (address.toStdString ());
@@ -405,13 +398,6 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int
405398 assert (invoked);
406399}
407400
408- static void NotifyWatchonlyChanged (WalletModel *walletmodel, bool fHaveWatchonly )
409- {
410- bool invoked = QMetaObject::invokeMethod (walletmodel, " updateWatchOnlyFlag" , Qt::QueuedConnection,
411- Q_ARG (bool , fHaveWatchonly ));
412- assert (invoked);
413- }
414-
415401static void NotifyCanGetAddressesChanged (WalletModel* walletmodel)
416402{
417403 bool invoked = QMetaObject::invokeMethod (walletmodel, " canGetAddressesChanged" );
@@ -426,7 +412,6 @@ void WalletModel::subscribeToCoreSignals()
426412 m_handler_address_book_changed = m_wallet->handleAddressBookChanged (std::bind (NotifyAddressBookChanged, this , std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
427413 m_handler_transaction_changed = m_wallet->handleTransactionChanged (std::bind (NotifyTransactionChanged, this , std::placeholders::_1, std::placeholders::_2));
428414 m_handler_show_progress = m_wallet->handleShowProgress (std::bind (ShowProgress, this , std::placeholders::_1, std::placeholders::_2));
429- m_handler_watch_only_changed = m_wallet->handleWatchOnlyChanged (std::bind (NotifyWatchonlyChanged, this , std::placeholders::_1));
430415 m_handler_can_get_addrs_changed = m_wallet->handleCanGetAddressesChanged (std::bind (NotifyCanGetAddressesChanged, this ));
431416}
432417
@@ -438,7 +423,6 @@ void WalletModel::unsubscribeFromCoreSignals()
438423 m_handler_address_book_changed->disconnect ();
439424 m_handler_transaction_changed->disconnect ();
440425 m_handler_show_progress->disconnect ();
441- m_handler_watch_only_changed->disconnect ();
442426 m_handler_can_get_addrs_changed->disconnect ();
443427}
444428
0 commit comments