diff --git a/CellFrameDashboardGUI/DapChainWalletsModel.cpp b/CellFrameDashboardGUI/DapChainWalletsModel.cpp index ad72f4ef71480dc16a7c61151bc843551aa82715..86d4815bf87c97a026390d0487193dac5c7b69f8 100755 --- a/CellFrameDashboardGUI/DapChainWalletsModel.cpp +++ b/CellFrameDashboardGUI/DapChainWalletsModel.cpp @@ -1,7 +1,7 @@ #include "DapChainWalletsModel.h" -DapChainWalletsModel::DapChainWalletsModel(QObject *parent) +DapChainWalletsModel::DapChainWalletsModel(QObject *parent) : QAbstractListModel(parent) { } diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxToken.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxToken.qml index e6fa4db7f7e781fd8c9d5c0fd95f25c453ddc182..4f9e0f595eee3434940084a584a5daccbf677211 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxToken.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxToken.qml @@ -28,7 +28,7 @@ DapUiQmlWidgetStatusBarComboBoxTokenForm { fieldBalance.text = 0; else { - var money = dapChainWalletsModel.get(comboboxWallet.currentIndex).tokens[currentIndex * 2]; + var money = dapChainWalletsModel.get(comboboxWallet.currentIndex).tokens[currentIndex * 3]; fieldBalance.text = dapChainConvertor.toConvertCurrency(money); } } diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml index f6899f524c1ad8712ffa559acc4e9d0a199f26c1..61e627fd6f7a5a339f8e5b17d313a8ceb1414257 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml @@ -27,7 +27,10 @@ DapUiQmlWidgetStatusBarComboBoxWalletForm { onCurrentIndexChanged: { listToken.model.clear(); for(var i = 0; i < dapChainWalletsModel.get(currentIndex).count; i++) + { + console.debug(dapChainWalletsModel.get(currentIndex).tokens); listToken.model.append({"tokenName": dapChainWalletsModel.get(currentIndex).tokens[++i]}); + } if(listToken.model.count) listToken.currentIndex = 0; } diff --git a/CellFrameDashboardService/DapChainWalletHandler.cpp b/CellFrameDashboardService/DapChainWalletHandler.cpp index 8d6c250e73ab80a248fa92dde3e5d34531d175b3..3ef3f4c21724b2018c64a0d78d6eaa528d8d70a2 100755 --- a/CellFrameDashboardService/DapChainWalletHandler.cpp +++ b/CellFrameDashboardService/DapChainWalletHandler.cpp @@ -82,7 +82,7 @@ QStringList DapChainWalletHandler::getWalletInfo(const QString &asNameWallet) process.start(QString("%1 wallet info -w %2 -net private").arg(CLI_PATH).arg(asNameWallet)); process.waitForFinished(-1); QByteArray result = process.readAll(); - QRegExp rx("wallet: (\\w+)\\s+addr:\\s+(\\w+)\\s+(balance)|(\\d+.\\d+)\\s(\\(\\d+\\))\\s(\\w+)"); + QRegExp rx("wallet: (.+)\\s+addr:\\s+(\\w+)\\s+(balance)|(\\d+.\\d+)\\s(\\(\\d+\\))\\s(\\w+)"); QStringList list; int pos = 0;