Skip to content

Commit

Permalink
Switch transaction table to use wallet height not node height
Browse files Browse the repository at this point in the history
Tweak of bitcoin#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.
  • Loading branch information
ryanofsky committed May 1, 2020
1 parent 608359b commit 83f69fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat
QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(parent);
TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->clientModel().getNumBlocks(), row);
TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->getNumBlocks(), row);
if(data)
{
return createIndex(row, column, data);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class WalletModel : public QObject

interfaces::Node& node() const { return m_node; }
interfaces::Wallet& wallet() const { return *m_wallet; }
ClientModel& clientModel() const { return m_client_model; }
int getNumBlocks() const { return cachedNumBlocks; }

QString getWalletName() const;
QString getDisplayName() const;
Expand Down

0 comments on commit 83f69fa

Please sign in to comment.