History: change tooltip for failed transactions

This commit is contained in:
tobtoht 2020-10-09 21:39:37 +02:00
parent f029820a37
commit 36495922a1

View file

@ -104,7 +104,9 @@ QVariant TransactionHistoryModel::data(const QModelIndex &index, int role) const
switch(index.column()) {
case Column::Date:
{
if (tInfo.confirmations() < tInfo.confirmationsRequired())
if (tInfo.isFailed())
result = "Transaction failed";
else if (tInfo.confirmations() < tInfo.confirmationsRequired())
result = QString("%1/%2 confirmations").arg(QString::number(tInfo.confirmations()), QString::number(tInfo.confirmationsRequired()));
else
result = QString("%1 confirmations").arg(QString::number(tInfo.confirmations()));