From cf35953e6956554f68777ee8227991008acbe645 Mon Sep 17 00:00:00 2001 From: adityapk00 Date: Fri, 18 Jan 2019 21:18:52 -0800 Subject: [PATCH] Add confirmations to websockets RPC --- src/txtablemodel.cpp | 4 ++++ src/txtablemodel.h | 1 + src/websockets.cpp | 3 ++- zec-qt-wallet.pro | 8 ++++---- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/txtablemodel.cpp b/src/txtablemodel.cpp index 9d44c00..cc099e7 100644 --- a/src/txtablemodel.cpp +++ b/src/txtablemodel.cpp @@ -194,6 +194,10 @@ QString TxTableModel::getMemo(int row) const { return modeldata->at(row).memo; } +qint64 TxTableModel::getConfirmations(int row) const { + return modeldata->at(row).confirmations; +} + QString TxTableModel::getAddr(int row) const { return modeldata->at(row).address.trimmed(); } diff --git a/src/txtablemodel.h b/src/txtablemodel.h index 362b621..9c09a2c 100644 --- a/src/txtablemodel.h +++ b/src/txtablemodel.h @@ -20,6 +20,7 @@ public: QString getAddr(int row) const; qint64 getDate(int row) const; QString getType(int row) const; + qint64 getConfirmations(int row) const; QString getAmt (int row) const; bool exportToCsv(QString fileName) const; diff --git a/src/websockets.cpp b/src/websockets.cpp index fd28909..3ef4a76 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -116,7 +116,8 @@ QJsonDocument AppDataServer::processGetTransactions(MainWindow* mainWindow) { {"amount", model->getAmt(i)}, {"txid", model->getTxId(i)}, {"address", model->getAddr(i)}, - {"memo", model->getMemo(i)} + {"memo", model->getMemo(i)}, + {"confirmations", model->getConfirmations(i)} }); } diff --git a/zec-qt-wallet.pro b/zec-qt-wallet.pro index 4279fe3..5987d44 100644 --- a/zec-qt-wallet.pro +++ b/zec-qt-wallet.pro @@ -109,8 +109,8 @@ qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target -win32:CONFIG(release, debug|release): LIBS += -L$$PWD/res/ -lsodium -else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/res/ -lsodiumd +win32:CONFIG(release, debug|release): LIBS += -L$$PWD/res/ -llibsodium +else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/res/ -llibsodiumd else:unix: LIBS += -L$$PWD/res/ -lsodium INCLUDEPATH += $$PWD/res @@ -118,6 +118,6 @@ DEPENDPATH += $$PWD/res win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/res/liblibsodium.a else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/res/liblibsodium.a -else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/res/sodium.lib -else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/res/sodiumd.lib +else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/res/libsodium.lib +else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/res/libsodiumd.lib else:unix: PRE_TARGETDEPS += $$PWD/res/libsodium.a