Skip to content
Snippets Groups Projects
Commit 4a391374 authored by jonymt's avatar jonymt
Browse files

[*] fixed wallets. corrected regex

[*] fixed wallets. corrected regex
parent bd834faa
No related branches found
No related tags found
1 merge request!12Bugs 2496
Pipeline #704 failed with stage
......@@ -252,7 +252,6 @@ void DapCommandController::getWalletInfo(const QString& asWalletName)
void DapCommandController::getNodeNetwork()
{
qInfo() << QString("getNodeNetwork()");
DapRpcServiceReply *reply = m_DAPRpcSocket->invokeRemoteMethod("RPCServer.getNodeNetwork");
connect(reply, SIGNAL(finished()), this, SLOT(processGetNodeNetwork()));
}
......
......@@ -187,7 +187,6 @@ void DapServiceController::getHistory()
void DapServiceController::getNodeNetwork()
{
qInfo() << QString("requestNodeNetwork");
m_pDapCommandController->getNodeNetwork();
}
......
......@@ -69,9 +69,8 @@ QMap<QString, QVariant> DapChainDashboardService::getWallets()
QStringList DapChainDashboardService::getWalletInfo(const QString &asWalletName)
{
// qInfo() << QString("getWalletInfo(%1)").arg(asWalletName);
// return m_pDapChainWalletHandler->getWalletInfo(asWalletName);
return QStringList();
qInfo() << QString("getWalletInfo(%1)").arg(asWalletName);
return m_pDapChainWalletHandler->getWalletInfo(asWalletName);
}
QVariant DapChainDashboardService::getNodeNetwork() const
......
......@@ -33,14 +33,14 @@ void DapChainHistoryHandler::onRequestNewHistory(const QMap<QString, QVariant>&
{
// TODO: error with "\r\n"
QString reg_str;
#ifdef Q_OS_LINUX
reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\n"
"\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
#endif
#ifdef Q_OS_WIN
reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\r\\n"
"\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
#endif
//#ifdef Q_OS_LINUX
// reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\n"
// "\\s(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
//#endif
//#ifdef Q_OS_WIN
reg_str = "(\\w{3}\\s\\w{3}\\s\\d+\\s\\d{1,2}:\\d{2}:\\d{2}\\s\\d{4})\\s+"
"(\\w+)\\s(\\d+)\\s(\\w+)\\s\\w+\\s+(\\w+)";
//#endif
QRegExp rx(reg_str);
......
......@@ -70,7 +70,7 @@ QMap<QString, QVariant> DapChainWalletHandler::getWallets()
QStringList DapChainWalletHandler::getWalletInfo(const QString &asNameWallet)
{
QProcess process;
process.start(QString("%1 wallet info -w %2 -net kelvin-testnet").arg(CLI_PATH).arg(asNameWallet));
process.start(QString("%1 wallet info -w %2 -net private").arg(CLI_PATH).arg(asNameWallet));
process.waitForFinished(-1);
char* response = process.readAll().data();
//qDebug() << response;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment