@@ -137,11 +137,10 @@ void WalletModel::updateTransaction()
137137 fForceCheckBalanceChanged = true ;
138138}
139139
140- void WalletModel::updateAddressBook (const QString &address, const QString &label,
141- bool isMine, const QString &purpose, int status)
140+ void WalletModel::updateAddressBook (const QString& address, const QString& label, bool isMine, const QString& purpose, int status, bool isActive)
142141{
143142 if (addressTableModel)
144- addressTableModel->updateEntry (address, label, isMine, purpose, status);
143+ addressTableModel->updateEntry (address, label, isMine, purpose, status, isActive );
145144}
146145
147146void WalletModel::updateWatchOnlyFlag (bool fHaveWatchonly )
@@ -375,21 +374,14 @@ static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel)
375374 assert (invoked);
376375}
377376
378- static void NotifyAddressBookChanged (WalletModel *walletmodel,
379- const CTxDestination &address, const std::string &label, bool isMine,
380- const std::string &purpose, ChangeType status)
377+ static void NotifyAddressBookChanged (WalletModel* walletmodel, const CTxDestination& address, const std::string& label, bool isMine, const std::string& purpose, ChangeType status, bool isActive)
381378{
382379 QString strAddress = QString::fromStdString (EncodeDestination (address));
383380 QString strLabel = QString::fromStdString (label);
384381 QString strPurpose = QString::fromStdString (purpose);
385382
386- qDebug () << " NotifyAddressBookChanged: " + strAddress + " " + strLabel + " isMine=" + QString::number (isMine) + " purpose=" + strPurpose + " status=" + QString::number (status);
387- bool invoked = QMetaObject::invokeMethod (walletmodel, " updateAddressBook" ,
388- Q_ARG (QString, strAddress),
389- Q_ARG (QString, strLabel),
390- Q_ARG (bool , isMine),
391- Q_ARG (QString, strPurpose),
392- Q_ARG (int , status));
383+ qDebug () << " NotifyAddressBookChanged: " + strAddress + " " + strLabel + " isMine=" + QString::number (isMine) + " purpose=" + strPurpose + " status=" + QString::number (status) + " isActive=" + QString::number (isActive);
384+ bool invoked = QMetaObject::invokeMethod (walletmodel, " updateAddressBook" , Q_ARG (QString, strAddress), Q_ARG (QString, strLabel), Q_ARG (bool , isMine), Q_ARG (QString, strPurpose), Q_ARG (int , status), Q_ARG (bool , isActive));
393385 assert (invoked);
394386}
395387
@@ -428,7 +420,7 @@ void WalletModel::subscribeToCoreSignals()
428420 // Connect signals to wallet
429421 m_handler_unload = m_wallet->handleUnload (std::bind (&NotifyUnload, this ));
430422 m_handler_status_changed = m_wallet->handleStatusChanged (std::bind (&NotifyKeyStoreStatusChanged, this ));
431- 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));
423+ 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, std::placeholders::_6 ));
432424 m_handler_transaction_changed = m_wallet->handleTransactionChanged (std::bind (NotifyTransactionChanged, this , std::placeholders::_1, std::placeholders::_2));
433425 m_handler_show_progress = m_wallet->handleShowProgress (std::bind (ShowProgress, this , std::placeholders::_1, std::placeholders::_2));
434426 m_handler_watch_only_changed = m_wallet->handleWatchOnlyChanged (std::bind (NotifyWatchonlyChanged, this , std::placeholders::_1));
@@ -601,11 +593,16 @@ bool WalletModel::isMultiwallet() const
601593 return m_node.walletLoader ().getWallets ().size () > 1 ;
602594}
603595
604- void WalletModel::refresh (const PlatformStyle* platformStyle, bool pk_hash_only)
596+ void WalletModel::RefreshAddressTableModel (const PlatformStyle* platformStyle, bool pk_hash_only)
605597{
606598 addressTableModel = new AddressTableModel (platformStyle, this , pk_hash_only);
607599}
608600
601+ void WalletModel::RefreshRecentRequestsTableModel (const PlatformStyle* platformStyle)
602+ {
603+ recentRequestsTableModel = new RecentRequestsTableModel (platformStyle, this );
604+ }
605+
609606uint256 WalletModel::getLastBlockProcessed () const
610607{
611608 return m_client_model ? m_client_model->getBestBlockHash () : uint256{};
0 commit comments