From 36495922a13be7a6f5e456a1dd98e127e8986c3a Mon Sep 17 00:00:00 2001
From: tobtoht <thotbot@protonmail.com>
Date: Fri, 9 Oct 2020 21:39:37 +0200
Subject: [PATCH] History: change tooltip for failed transactions

---
 src/model/TransactionHistoryModel.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp
index 590386e..c4a1c41 100644
--- a/src/model/TransactionHistoryModel.cpp
+++ b/src/model/TransactionHistoryModel.cpp
@@ -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()));