File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ class TransactionTablePriv
9797 QList<TransactionRecord> cachedWallet;
9898
9999 bool fQueueNotifications = false ;
100+ /* * True when model finishes loading all wallet transactions on start */
101+ bool m_loaded = false ;
100102 std::vector< TransactionNotification > vQueueNotifications;
101103
102104 void NotifyTransactionChanged (const uint256 &hash, ChangeType status);
@@ -106,15 +108,15 @@ class TransactionTablePriv
106108 */
107109 void refreshWallet (interfaces::Wallet& wallet)
108110 {
109- qDebug () << " TransactionTablePriv::refreshWallet" ;
110- cachedWallet.clear ();
111+ assert (!m_loaded);
111112 {
112113 for (const auto & wtx : wallet.getWalletTxs ()) {
113114 if (TransactionRecord::showTransaction ()) {
114115 cachedWallet.append (TransactionRecord::decomposeTransaction (wtx));
115116 }
116117 }
117118 }
119+ m_loaded = true ;
118120 }
119121
120122 /* Update our model of the wallet incrementally, to synchronize our model of the wallet
You can’t perform that action at this time.
0 commit comments