Skip to content

Commit 83f69fa

Browse files
committed
Switch transaction table to use wallet height not node height
Tweak of #17905 to make gui display of transactions and balances more consistent. This change shouldn't cause visible effects in normal cases, just make GUI wallet code more internally correct and consistent.
1 parent 608359b commit 83f69fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/qt/transactiontablemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat
664664
QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex &parent) const
665665
{
666666
Q_UNUSED(parent);
667-
TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->clientModel().getNumBlocks(), row);
667+
TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->getNumBlocks(), row);
668668
if(data)
669669
{
670670
return createIndex(row, column, data);

src/qt/walletmodel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class WalletModel : public QObject
144144

145145
interfaces::Node& node() const { return m_node; }
146146
interfaces::Wallet& wallet() const { return *m_wallet; }
147-
ClientModel& clientModel() const { return m_client_model; }
147+
int getNumBlocks() const { return cachedNumBlocks; }
148148

149149
QString getWalletName() const;
150150
QString getDisplayName() const;

0 commit comments

Comments
 (0)