| 123 | } |
| 124 | |
| 125 | void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/) |
| 126 | { |
| 127 | // Prevent balloon-spam when initial block download is in progress |
| 128 | if (!clientModel || clientModel->node().isInitialBlockDownload()) { |
| 129 | return; |
| 130 | } |
| 131 | |
| 132 | TransactionTableModel *ttm = walletModel->getTransactionTableModel(); |
| 133 | if (!ttm || ttm->processingQueuedTransactions()) |
| 134 | return; |
| 135 | |
| 136 | QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString(); |
| 137 | qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toLongLong(); |
| 138 | QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString(); |
| 139 | QModelIndex index = ttm->index(start, 0, parent); |
| 140 | QString address = ttm->data(index, TransactionTableModel::AddressRole).toString(); |
| 141 | QString label = GUIUtil::HtmlEscape(ttm->data(index, TransactionTableModel::LabelRole).toString()); |
| 142 | |
| 143 | Q_EMIT incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label, GUIUtil::HtmlEscape(walletModel->getWalletName())); |
| 144 | } |
| 145 | |
| 146 | void WalletView::gotoOverviewPage() |
| 147 | { |
nothing calls this directly
no test coverage detected