From dfea362c87d5642950b1b7dd51a99060006e663a Mon Sep 17 00:00:00 2001
From: jonymt <johanmt@yandex.ru>
Date: Thu, 12 Sep 2019 11:41:18 +0200
Subject: [PATCH] [*] changed regexp

---
 KelvinDashboardGUI/DapScreenHistoryModel.cpp      | 1 -
 KelvinDashboardService/DapChainHistoryHandler.cpp | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/KelvinDashboardGUI/DapScreenHistoryModel.cpp b/KelvinDashboardGUI/DapScreenHistoryModel.cpp
index 859ba364e..e5ed78fc4 100644
--- a/KelvinDashboardGUI/DapScreenHistoryModel.cpp
+++ b/KelvinDashboardGUI/DapScreenHistoryModel.cpp
@@ -78,7 +78,6 @@ void DapScreenHistoryModel::receiveNewData(const QVariant& aData)
         item.WalletNumber = dataItem.at(5);
         //  TODO: Later we should convert currency
         item.Currency = "$ 0 USD";
-        qWarning() << aData;
 
         switch (item.Status) {
             case DapTransactionStatus::stSent: item.Cryptocurrency.prepend("- "); break;
diff --git a/KelvinDashboardService/DapChainHistoryHandler.cpp b/KelvinDashboardService/DapChainHistoryHandler.cpp
index 5e64edf7c..0145eefb6 100644
--- a/KelvinDashboardService/DapChainHistoryHandler.cpp
+++ b/KelvinDashboardService/DapChainHistoryHandler.cpp
@@ -29,13 +29,12 @@ void DapChainHistoryHandler::onRequestNewHistory(const QMap<QString, QVariant>&
 
         if(!result.isEmpty())
         {
-            QRegExp rx("(\\w{3} \\w{3} \\d+ \\d{1,2}:\\d{2}:\\d{2} \\d{4})\\s+"
-                       "(\\w+) (\\d+) (\\w+) \\w+ (\\w+)");
+            QRegExp rx("((\\w{3}\\s){2}\\d{1,2}\\s(\\d{1,2}:*){3}\\s\\d{4})\\s+(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s([\\w\\d]+)");
 
             int pos = 0;
             while ((pos = rx.indexIn(result, pos)) != -1)
             {
-                QStringList dataItem = QStringList() << rx.cap(1) << QString::number(DapTransactionStatusConvertor::getStatusByShort(rx.cap(2))) << rx.cap(3) << rx.cap(4) << rx.cap(5) << wallets.at(i).toString();
+                QStringList dataItem = QStringList() << rx.cap(1) << QString::number(DapTransactionStatusConvertor::getStatusByShort(rx.cap(4))) << rx.cap(5) << rx.cap(6) << rx.cap(7) << wallets.at(i).toString();
                 qDebug() << "NEW MATCH" << pos << dataItem;
                 data << dataItem;
                 pos += rx.matchedLength();
-- 
GitLab