From 6baacf8b66d179d150fa60835d536125f20f05cb Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 16 Jan 2015 23:26:39 +0100 Subject: [PATCH] firing eth_changed, fixed #804 --- libqwebthree/QWebThree.cpp | 2 +- libweb3jsonrpc/WebThreeStubServerBase.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libqwebthree/QWebThree.cpp b/libqwebthree/QWebThree.cpp index 891d84ffa..3f4b5c67d 100644 --- a/libqwebthree/QWebThree.cpp +++ b/libqwebthree/QWebThree.cpp @@ -140,7 +140,7 @@ void QWebThree::onDataProcessed(QString _json, QString _addInfo) for (int i = 0; i < resultsArray.size(); i++) { QJsonObject elem = resultsArray[i].toObject(); - if (elem.contains("result")) + if (elem["result"].isArray() && elem["result"].toArray().size() > 0) { QJsonObject res; res["_event"] = _addInfo; diff --git a/libweb3jsonrpc/WebThreeStubServerBase.cpp b/libweb3jsonrpc/WebThreeStubServerBase.cpp index 5003454f0..640ad3679 100644 --- a/libweb3jsonrpc/WebThreeStubServerBase.cpp +++ b/libweb3jsonrpc/WebThreeStubServerBase.cpp @@ -84,7 +84,7 @@ static Json::Value toJson(dev::eth::LocalisedLogEntry const& _e) static Json::Value toJson(dev::eth::LocalisedLogEntries const& _es) // commented to avoid warning. Uncomment once in use @ poC-7. { - Json::Value res; + Json::Value res(Json::arrayValue); for (dev::eth::LocalisedLogEntry const& e: _es) res.append(toJson(e)); return res;