Skip to content

Commit

Permalink
fix(qt): allow refreshing wallet data without crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Dec 6, 2024
1 parent 65800cb commit 909a72c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ class TransactionTablePriv

/* Query entire wallet anew from core.
*/
void refreshWallet(interfaces::Wallet& wallet)
void refreshWallet(interfaces::Wallet& wallet, bool force = false)
{
parent->beginResetModel();
assert(!m_loaded);
assert(!m_loaded || force);
try {
for (const auto& wtx : wallet.getWalletTxs()) {
if (TransactionRecord::showTransaction()) {
Expand Down Expand Up @@ -848,7 +848,7 @@ void TransactionTablePriv::DispatchNotifications()
}
} else {
// it's much faster to just refresh the whole thing instead
bool invoked = QMetaObject::invokeMethod(parent, "refreshWallet", Qt::QueuedConnection);
bool invoked = QMetaObject::invokeMethod(parent, "refreshWallet", Qt::QueuedConnection, Q_ARG(bool, true));
assert(invoked);
}
vQueueNotifications.clear();
Expand Down

0 comments on commit 909a72c

Please sign in to comment.