diff --git a/CellFrameDashboardGUI/DapCommandController.cpp b/CellFrameDashboardGUI/DapCommandController.cpp index faea4056affc9de474be9abaf0e477e6ea1f6875..e3f4591996bb3b07cdd4669fb4a95d206812742a 100755 --- a/CellFrameDashboardGUI/DapCommandController.cpp +++ b/CellFrameDashboardGUI/DapCommandController.cpp @@ -154,22 +154,8 @@ void DapCommandController::processGetWalletInfo() QString address = reply->response().toJsonValue().toVariant().toStringList().at(1); QStringList temp = reply->response().toJsonValue().toVariant().toStringList(); QStringList tokens = temp.mid(3, temp.count()); - QStringList balance; -// for(int x{2}; x < temp.count(); x++) -// { -// if(x%2) -// { -// tokens.append(temp[x]); -// qDebug() << "TOKKEN " << temp[x]; -// } -// else -// { -// balance.append(temp[x]); -// qDebug() << "BALANCE " << temp[x]; -// } -// } - emit sigWalletInfoChanged(name, address, balance, tokens); + emit sigWalletInfoChanged(name, address, QStringList(), tokens); } void DapCommandController::processGetNodeNetwork() diff --git a/CellFrameDashboardService/DapChainDashboardService.cpp b/CellFrameDashboardService/DapChainDashboardService.cpp index d12ef4577ce76de2d464f73a737a45dc5889cee7..d92d11a27ea4a1dafe7532ad4ec1138dc7f69679 100755 --- a/CellFrameDashboardService/DapChainDashboardService.cpp +++ b/CellFrameDashboardService/DapChainDashboardService.cpp @@ -116,7 +116,12 @@ void DapChainDashboardService::changeCurrentNetwork(const QString& aNetwork) void DapChainDashboardService::doRequestWallets() { - m_pDapChainHistoryHandler->onRequestNewHistory(m_pDapChainWalletHandler->getWallets()); + QMap<QString, QVariant> wallets = m_pDapChainWalletHandler->getWallets(); + m_pDapChainHistoryHandler->onRequestNewHistory(wallets); + /// TODO: for future +// QVariantList params = QVariantList() << wallets; +// DapRpcMessage request = DapRpcMessage::createRequest("RPCClient.setNewWallets", QJsonArray::fromVariantList(params)); +// m_pServer->notifyConnectedClients(request); } void DapChainDashboardService::doSendNewHistory(const QVariant& aData) diff --git a/CellFrameDashboardService/DapChainWalletHandler.cpp b/CellFrameDashboardService/DapChainWalletHandler.cpp index 3ef3f4c21724b2018c64a0d78d6eaa528d8d70a2..309c0988d1ddd7e3cf065f0313361509f010d1a4 100755 --- a/CellFrameDashboardService/DapChainWalletHandler.cpp +++ b/CellFrameDashboardService/DapChainWalletHandler.cpp @@ -51,28 +51,6 @@ QMap<QString, QVariant> DapChainWalletHandler::getWallets() map[match.captured(1)] = match.captured(2); } - -// QString str = QString::fromLatin1(process.readAll()); -// QRegExp rx(":{1,1}([\\s\\w\\W]+)(\\n|\\r){1,1}" ); -// rx.setMinimal(true); -// int pos = 0; -// int x {0}; -// QString tempName; -// while ((pos = rx.indexIn(str, pos)) != -1) -// { -// if(x == 0) -// { -// tempName = rx.cap(1); -// ++x; -// } -// else -// { -// map.insert(tempName, rx.cap(1)); -// x = 0; -// } -// pos += rx.matchedLength(); -// } - return map; }