From ec7d3d99ed93fffcce63c72887782cd680befd1e Mon Sep 17 00:00:00 2001 From: "vladislav.cholak" <vlad.hoc10@gmail.com> Date: Mon, 1 Jul 2019 03:35:58 +0300 Subject: [PATCH] Added possibility to make transactions and fixed some UI elems --- DapRPCProtocol/DapRpcService.cpp | 1 + KelvinDashboardGUI/DapCommandController.cpp | 7 +- KelvinDashboardGUI/DapCommandController.h | 2 +- KelvinDashboardGUI/DapServiceController.cpp | 4 +- KelvinDashboardGUI/DapServiceController.h | 2 +- .../DapUiQmlScreenDialogSendToken.qml | 256 ++++++++++-------- .../DapUiQmlWidgetChainTransactions.cpp | 6 + .../DapUiQmlWidgetChainTransactions.h | 12 + .../DapUiQmlWidgetChainTransctions.cpp | 6 - .../DapUiQmlWidgetChainTransctions.h | 12 - .../DapUiQmlWidgetChainWallet.qml | 17 +- .../DapUiQmlWidgetChainWalletForm.ui.qml | 20 +- KelvinDashboardGUI/KelvinDashboardGUI.pro | 4 +- .../DapChainDashboardService.cpp | 6 + .../DapChainDashboardService.h | 2 + .../DapChainWalletHandler.cpp | 4 +- .../DapChainWalletHandler.h | 2 +- 17 files changed, 207 insertions(+), 156 deletions(-) create mode 100644 KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.cpp create mode 100644 KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.h delete mode 100644 KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.cpp delete mode 100644 KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.h diff --git a/DapRPCProtocol/DapRpcService.cpp b/DapRPCProtocol/DapRpcService.cpp index f52ce29db..7159d4acc 100644 --- a/DapRPCProtocol/DapRpcService.cpp +++ b/DapRPCProtocol/DapRpcService.cpp @@ -252,6 +252,7 @@ DapRpcMessage DapRpcService::dispatch(const DapRpcMessage &aRequest) } const QByteArray &method(methodName(aRequest)); + qDebug() << method; if (!m_invokableMethodHash.contains(method)) { return aRequest.createErrorResponse(DapErrorCode::MethodNotFound, "invalid method called"); } diff --git a/KelvinDashboardGUI/DapCommandController.cpp b/KelvinDashboardGUI/DapCommandController.cpp index 182ccb63f..1bfc3ce29 100755 --- a/KelvinDashboardGUI/DapCommandController.cpp +++ b/KelvinDashboardGUI/DapCommandController.cpp @@ -75,6 +75,7 @@ void DapCommandController::processSendToken() qWarning() << "Invalid response received"; return; } + qInfo() << reply->response(); emit sigCommandResult(reply->response().result()); auto answer = reply->response().result().toVariant().toString(); emit onTokenSended(answer); @@ -115,9 +116,7 @@ void DapCommandController::processGetWalletInfo() } else { - QString s; - s.setNum(x*10); - balance.append(temp[x] + s); + balance.append(temp[x]); qDebug() << "BALANCE " << temp[x]; } } @@ -156,7 +155,7 @@ void DapCommandController::addWallet(const QString &asWalletName) connect(reply, SIGNAL(finished()), this, SLOT(processAddWallet())); } -void DapCommandController::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const double &aAmount) +void DapCommandController::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const QString &aAmount) { qInfo() << QString("sendToken(%1, %2, %3, %4)").arg(asSendWallet).arg(asAddressReceiver).arg(asToken).arg(aAmount); DapRpcServiceReply *reply = m_DAPRpcSocket->invokeRemoteMethod("RPCServer.sendToken", asSendWallet, asAddressReceiver, asToken, aAmount); diff --git a/KelvinDashboardGUI/DapCommandController.h b/KelvinDashboardGUI/DapCommandController.h index be2a4e33a..b07c37447 100755 --- a/KelvinDashboardGUI/DapCommandController.h +++ b/KelvinDashboardGUI/DapCommandController.h @@ -71,7 +71,7 @@ public slots: void getNodeLogs(int aiTimeStamp, int aiRowCount); void addWallet(const QString& asWalletName); - void sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const double& aAmount); + void sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const QString& aAmount); void getWallets(); diff --git a/KelvinDashboardGUI/DapServiceController.cpp b/KelvinDashboardGUI/DapServiceController.cpp index cbbd01794..528a574ad 100755 --- a/KelvinDashboardGUI/DapServiceController.cpp +++ b/KelvinDashboardGUI/DapServiceController.cpp @@ -120,10 +120,10 @@ void DapServiceController::addWallet(const QString &asWalletName) m_pDapCommandController->addWallet(asWalletName); } -void DapServiceController::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const double &aAmount) +void DapServiceController::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const QString &aAmount) { qInfo() << QString("sendToken(%1, %2, %3, %4)").arg(asSendWallet).arg(asAddressReceiver).arg(asToken).arg(aAmount); - m_pDapCommandController->sendToken(asSendWallet, asAddressReceiver, asToken, aAmount); + m_pDapCommandController->sendToken(asSendWallet.trimmed(), asAddressReceiver.trimmed(), asToken.trimmed(), aAmount); } void DapServiceController::getWalletInfo(const QString &asWalletName) diff --git a/KelvinDashboardGUI/DapServiceController.h b/KelvinDashboardGUI/DapServiceController.h index eaacfd336..d71ae8693 100755 --- a/KelvinDashboardGUI/DapServiceController.h +++ b/KelvinDashboardGUI/DapServiceController.h @@ -67,7 +67,7 @@ public: void setLogModel(const DapLogModel &dapLogModel); Q_INVOKABLE void addWallet(const QString& asWalletName); - Q_INVOKABLE void sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const double& aAmount); + Q_INVOKABLE void sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const QString& aAmount); void getWalletInfo(const QString& asWalletName); diff --git a/KelvinDashboardGUI/DapUiQmlScreenDialogSendToken.qml b/KelvinDashboardGUI/DapUiQmlScreenDialogSendToken.qml index a1079ba42..bd4e547da 100755 --- a/KelvinDashboardGUI/DapUiQmlScreenDialogSendToken.qml +++ b/KelvinDashboardGUI/DapUiQmlScreenDialogSendToken.qml @@ -11,140 +11,170 @@ Dialog { title: qsTr("Send token...") width: parent.width/1.5 - height: 200 + height: 280 x: parent.width / 2 - width / 2 y: parent.height / 2 - height / 2 function show() { - dialogSendToken.open(); - } + dialogSendToken.open(); + } contentItem: Rectangle - { - anchors.fill: parent - -// TextField -// { -// background: Rectangle { -// radius: 2 -// border.color: "gray" -// border.width: 1 -// } - -// id: textFieldNameWallet -// selectByMouse: true -// height: 35 -// anchors.bottom: buttonOk.top -// anchors.bottomMargin: 20 -// anchors.right: parent.right -// anchors.rightMargin: 10 -// anchors.left: parent.left -// anchors.leftMargin: 10 -// font.pixelSize: 20 -// clip: true - - -// } - - ComboBox { - id: comboBoxAddressWallet - anchors.bottom: spinBoxAmount.top - anchors.bottomMargin: 20 - anchors.right: parent.right - anchors.rightMargin: 10 - anchors.left: parent.left - anchors.leftMargin: 10 - editable: true - textRole: "text" - onAccepted: { - if (find(currentText) === -1) { - model.append({text: editText}) -// currentIndex = find(editText) -// fnameField.insert(currentIndex) - - } + { + anchors.fill: parent + + // TextField + // { + // background: Rectangle { + // radius: 2 + // border.color: "gray" + // border.width: 1 + // } + + // id: textFieldNameWallet + // selectByMouse: true + // height: 35 + // anchors.bottom: buttonOk.top + // anchors.bottomMargin: 20 + // anchors.right: parent.right + // anchors.rightMargin: 10 + // anchors.left: parent.left + // anchors.leftMargin: 10 + // font.pixelSize: 20 + // clip: true + + + // } + + ComboBox { + id: comboBoxToken + anchors { bottom: comboBoxAddressWallet.top; bottomMargin: 20; right: parent.right; rightMargin: 10; + left: parent.left; leftMargin: 10 } + model: listViewTokens.model + delegate: ItemDelegate { + width: comboBoxToken.width + contentItem: Text { + text: modelData + font: comboBoxToken.font + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + highlighted: comboBoxToken.highlightedIndex !== index + } + } + + ComboBox { + id: comboBoxAddressWallet + anchors.bottom: textFieldAmount.top + anchors.bottomMargin: 20 + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.left: parent.left + anchors.leftMargin: 10 + editable: true + textRole: "text" + onAccepted: { + if (find(currentText) === -1) { + model.append({text: editText}) + // currentIndex = find(editText) + // fnameField.insert(currentIndex) + } } + } + + TextField { + property real realValue: parseFloat(textFieldAmount.text.replace(',', '.')) * 1e12; + + id: textFieldAmount + anchors.bottom: buttonOk.top + anchors.bottomMargin: 20 + anchors.right: parent.right + anchors.rightMargin: 10 + placeholderText: "Amount (Ex. 2,9103)" + validator: DoubleValidator{} + } + + Button + { + id: buttonCancel + text: qsTr("Cancel") + anchors.right: buttonOk.left + anchors.rightMargin: 10 + anchors.bottom: parent.bottom + anchors.bottomMargin: 10 + + contentItem: Text { + text: buttonCancel.text + font: buttonCancel.font + opacity: enabled ? 1.0 : 0.3 + color: buttonCancel.down ? "#353841" : "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } - SpinBox { - id: spinBoxAmount - anchors.bottom: buttonOk.top - anchors.bottomMargin: 20 - anchors.right: parent.right - anchors.rightMargin: 10 - editable: true + background: Rectangle { + implicitWidth: 100 + implicitHeight: 30 + opacity: enabled ? 1 : 0.3 + color: buttonCancel.down ? "white" : "#353841" + radius: 4 } - Button + onClicked: { - id: buttonCancel - text: qsTr("Cancel") - anchors.right: buttonOk.left - anchors.rightMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 + close() + } + } - contentItem: Text { - text: buttonCancel.text - font: buttonCancel.font - opacity: enabled ? 1.0 : 0.3 - color: buttonCancel.down ? "#353841" : "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 30 - opacity: enabled ? 1 : 0.3 - color: buttonCancel.down ? "white" : "#353841" - radius: 4 - } - - onClicked: - { - textFieldNameWallet.clear() - close() - } + Button + { + id: buttonOk + text: "OK" + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.bottom: parent.bottom + anchors.bottomMargin: 10 + contentItem: Text { + text: buttonOk.text + font: buttonOk.font + opacity: enabled ? 1.0 : 0.3 + color: buttonOk.down ? "#353841" : "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + implicitWidth: 100 + implicitHeight: 30 + opacity: enabled ? 1 : 0.3 + color: buttonOk.down ? "white" : "#353841" + radius: 4 } - Button + onClicked: { - id: buttonOk - text: "OK" - anchors.right: parent.right - anchors.rightMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 - contentItem: Text { - text: buttonOk.text - font: buttonOk.font - opacity: enabled ? 1.0 : 0.3 - color: buttonOk.down ? "#353841" : "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - background: Rectangle { - implicitWidth: 100 - implicitHeight: 30 - opacity: enabled ? 1 : 0.3 - color: buttonOk.down ? "white" : "#353841" - radius: 4 - } - - onClicked: - { -// dapServiceController.addWallet(textFieldNameWallet.text) - console.log(comboBoxAddressWallet.displayText) - close() + let wallet = listViewWallet.model.get(listViewWallet.currentIndex).name; + let token = comboBoxToken.currentText; + let amount = textFieldAmount.realValue.toString(); + let receiver = comboBoxAddressWallet.editText; + + if (wallet && token && amount && receiver) { + console.log("Send " + token + "(" + amount + ") to address " + receiver + " from wallet " + wallet ); + dapServiceController.sendToken(wallet, receiver, token, amount); + } else { + console.log("There's error!"); + console.log(amount); } + + close() } } + } } diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.cpp b/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.cpp new file mode 100644 index 000000000..3231a0962 --- /dev/null +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.cpp @@ -0,0 +1,6 @@ +#include "DapUiQmlWidgetChainTransactions.h" + +DapUiQmlWidgetChainTransactions::DapUiQmlWidgetChainTransactions(const QString &name, const QString &URLpage, const QString &image) : DapUiQmlWidget(name, URLpage, image) +{ + +} diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.h b/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.h new file mode 100644 index 000000000..d68fb2d08 --- /dev/null +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainTransactions.h @@ -0,0 +1,12 @@ +#ifndef DAPUIQMLWIDGETCHAINTRANSCTIONS_H +#define DAPUIQMLWIDGETCHAINTRANSCTIONS_H + +#include "DapUiQmlWidget.h" + +class DapUiQmlWidgetChainTransactions : public DapUiQmlWidget +{ +public: + explicit DapUiQmlWidgetChainTransactions(const QString &name, const QString &URLpage, const QString &image); +}; + +#endif // DAPUIQMLWIDGETCHAINTRANSCTIONS_H diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.cpp b/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.cpp deleted file mode 100644 index df9441b20..000000000 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "DapUiQmlWidgetChainTransctions.h" - -DapUiQmlWidgetChainTransctions::DapUiQmlWidgetChainTransctions(const QString &name, const QString &URLpage, const QString &image) : DapUiQmlWidget(name, URLpage, image) -{ - -} diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.h b/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.h deleted file mode 100644 index 3fe4c1a73..000000000 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainTransctions.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DAPUIQMLWIDGETCHAINTRANSCTIONS_H -#define DAPUIQMLWIDGETCHAINTRANSCTIONS_H - -#include "DapUiQmlWidget.h" - -class DapUiQmlWidgetChainTransctions : public DapUiQmlWidget -{ -public: - explicit DapUiQmlWidgetChainTransctions(const QString &name, const QString &URLpage, const QString &image); -}; - -#endif // DAPUIQMLWIDGETCHAINTRANSCTIONS_H diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainWallet.qml b/KelvinDashboardGUI/DapUiQmlWidgetChainWallet.qml index 2dcbae166..fda575952 100755 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainWallet.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainWallet.qml @@ -27,15 +27,14 @@ DapUiQmlWidgetChainWalletForm { listViewWallet.onCurrentItemChanged: { listViewTokens.model = listViewWallet.model.get(listViewWallet.currentIndex).tokens -// console.log("Заголовок " + listViewWallet.model.get(listViewWallet.currentIndex).address) - console.log(listViewWallet.currentIndex) - - + updateBalanceText(); + addressWallet.text = listViewWallet.model.get(listViewWallet.currentIndex).address } listViewTokens.onCurrentItemChanged: { - textBalance.text = listViewWallet.model.get(listViewWallet.currentIndex).balance[listViewTokens.currentIndex] + updateBalanceText(); + console.log(textBalance.text); } buttonSaveWallet.onClicked: { @@ -45,5 +44,11 @@ DapUiQmlWidgetChainWalletForm { dialogSendToken.show() } - + function updateBalanceText() { + let value = listViewTokens.currentIndex > -1 ? listViewWallet.model.get(listViewWallet.currentIndex).balance[listViewTokens.currentIndex] : ""; + if (value) + textBalance.text = value.replace(/[^\d.-]/g, ''); + else + textBalance.text = ''; + } } diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml index 680615889..aefc75746 100755 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainWalletForm.ui.qml @@ -12,11 +12,11 @@ Page { property alias listViewWallet: listViewWallet property alias buttonSaveWallet: buttonSaveWallet property alias dialogAddWallet: dialogAddWallet - property alias buttonSendToken: buttonSendToken property alias dialogSendToken: dialogSendToken property alias addressWallet: addressWallet - property alias listViewTokens: listViewTokens property alias textBalance: textBalance + property alias listViewTokens: listViewTokens + property alias buttonSendToken: buttonSendToken Rectangle { @@ -74,24 +74,29 @@ Page { TextEdit { id: addressWallet - font.pixelSize: 16 + font.pixelSize: 11 wrapMode: Text.Wrap selectByMouse: true color: "black" + selectionColor: "#008080" + clip: true anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter + anchors.left: parent.left + readOnly: true } ListView { id: listViewTokens - orientation: ListView.Horizontal + orientation: ListView.Vertical anchors.top: addressWallet.bottom anchors.left: parent.left anchors.bottom: parent.bottom width: parent.width*2/3 + flickableDirection: Flickable.VerticalFlick delegate: Item { width: 200; height: 50 - Text { id: nameField; text: modelData } + Text { id: nameField; text: modelData; color: listViewTokens.currentIndex === index ? 'green' : 'black'; } MouseArea { anchors.fill: parent onClicked: listViewTokens.currentIndex = index @@ -104,12 +109,15 @@ Page { Text { id: textBalance + wrapMode: Text.NoWrap + textFormat: Text.PlainText + clip: false anchors.top: addressWallet.bottom anchors.left: listViewTokens.right anchors.bottom: parent.bottom anchors.right: parent.right - font.pixelSize: 70 + font.pixelSize: 30 font.bold: true } } diff --git a/KelvinDashboardGUI/KelvinDashboardGUI.pro b/KelvinDashboardGUI/KelvinDashboardGUI.pro index a067d00a6..88630aa38 100755 --- a/KelvinDashboardGUI/KelvinDashboardGUI.pro +++ b/KelvinDashboardGUI/KelvinDashboardGUI.pro @@ -38,11 +38,11 @@ ICON = icon.ico #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + DapUiQmlWidgetChainTransactions.cpp \ main.cpp \ DapUiQmlWidgetChainBallance.cpp \ DapUiQmlWidgetChainBlockExplorer.cpp \ DapUiQmlWidgetChainNodeLogs.cpp \ - DapUiQmlWidgetChainTransctions.cpp \ DapUiQmlWidgetChainOperations.cpp \ DapUiQmlWidgetModel.cpp \ DapUiQmlWidget.cpp \ @@ -72,9 +72,9 @@ HEADERS += \ DapUiQmlWidgetChainBallance.h \ DapUiQmlWidgetChainBlockExplorer.h \ DapUiQmlWidgetChainNodeLogs.h \ - DapUiQmlWidgetChainTransctions.h \ DapUiQmlScreenDashboard.h \ DapUiQmlWidgetChainOperations.h \ + DapUiQmlWidgetChainTransactions.h \ DapUiQmlWidgetModel.h \ DapUiQmlWidget.h \ DapScreenDialog.h \ diff --git a/KelvinDashboardService/DapChainDashboardService.cpp b/KelvinDashboardService/DapChainDashboardService.cpp index cf5466d8f..d8bb54ee9 100755 --- a/KelvinDashboardService/DapChainDashboardService.cpp +++ b/KelvinDashboardService/DapChainDashboardService.cpp @@ -59,6 +59,12 @@ QStringList DapChainDashboardService::getWalletInfo(const QString &asWalletName) return m_pDapChainWalletHandler->getWalletInfo(asWalletName); } +QString DapChainDashboardService::sendToken(const QString &asWalletName, const QString &asReceiverAddr, const QString &asToken, const QString &asAmount) +{ + qInfo() << QString("sendToken(%1;%2;%3;%4)").arg(asWalletName).arg(asReceiverAddr).arg(asToken).arg(asAmount); + return m_pDapChainWalletHandler->sendToken(asWalletName, asReceiverAddr, asToken, asAmount); +} + /// Activate the main client window by double-clicking the application icon in the system tray. /// @param reason Type of action on the icon in the system tray. diff --git a/KelvinDashboardService/DapChainDashboardService.h b/KelvinDashboardService/DapChainDashboardService.h index 6510559e6..f6e69b8c0 100755 --- a/KelvinDashboardService/DapChainDashboardService.h +++ b/KelvinDashboardService/DapChainDashboardService.h @@ -73,6 +73,8 @@ public slots: QMap<QString, QVariant> getWallets(); QStringList getWalletInfo(const QString &asWalletName); + + QString sendToken(const QString &asWalletName, const QString &asReceiverAddr, const QString &asToken, const QString &asAmount); }; diff --git a/KelvinDashboardService/DapChainWalletHandler.cpp b/KelvinDashboardService/DapChainWalletHandler.cpp index c26e00b4f..86dd61d20 100755 --- a/KelvinDashboardService/DapChainWalletHandler.cpp +++ b/KelvinDashboardService/DapChainWalletHandler.cpp @@ -78,10 +78,10 @@ QStringList DapChainWalletHandler::getWalletInfo(const QString &asNameWallet) return list; } -QString DapChainWalletHandler::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const double &aAmount) +QString DapChainWalletHandler::sendToken(const QString &asSendWallet, const QString &asAddressReceiver, const QString &asToken, const QString &aAmount) { QString answer; - qInfo() << QString("sendToken(%1, %2, %3, %4)").arg(asSendWallet).arg(asAddressReceiver).arg(asToken).arg(aAmount); + qInfo() << QString("sendTokenTest(%1, %2, %3, %4)").arg(asSendWallet).arg(asAddressReceiver).arg(asToken).arg(aAmount); QProcess processCreate; processCreate.start(QString("%1 tx_create -net private -chain gdb -from_wallet %2 -to_addr %3 -token %4 -value %5") .arg("/opt/kelvin-node/bin/kelvin-node-cli") diff --git a/KelvinDashboardService/DapChainWalletHandler.h b/KelvinDashboardService/DapChainWalletHandler.h index 74bf44a65..a365abdf1 100755 --- a/KelvinDashboardService/DapChainWalletHandler.h +++ b/KelvinDashboardService/DapChainWalletHandler.h @@ -22,7 +22,7 @@ public slots: QStringList createWallet(const QString& asNameWallet); QMap<QString, QVariant> getWallets(); QStringList getWalletInfo(const QString& asNameWallet); - QString sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const double& aAmount); + QString sendToken(const QString &asSendWallet, const QString& asAddressReceiver, const QString& asToken, const QString& aAmount); }; #endif // DAPCHAINWALLETHANDLER_H -- GitLab