diff --git a/CellFrameDashboardGUI/DapCommandController.cpp b/CellFrameDashboardGUI/DapCommandController.cpp index 2bdd5a377bff6f669c51664a1a4c867a73789c18..faea4056affc9de474be9abaf0e477e6ea1f6875 100755 --- a/CellFrameDashboardGUI/DapCommandController.cpp +++ b/CellFrameDashboardGUI/DapCommandController.cpp @@ -153,21 +153,21 @@ void DapCommandController::processGetWalletInfo() QString name = reply->response().toJsonValue().toVariant().toStringList().at(0); QString address = reply->response().toJsonValue().toVariant().toStringList().at(1); QStringList temp = reply->response().toJsonValue().toVariant().toStringList(); - QStringList tokens; + 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]; - } - } +// 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); } diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml index 61e627fd6f7a5a339f8e5b17d313a8ceb1414257..d294cc0cb9bd2502a0eb0e5f00798b9c3edb7979 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBarComboBoxWallet.qml @@ -26,11 +26,8 @@ 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]}); - } + for(var i = 2; i < dapChainWalletsModel.get(currentIndex).count; i += 3) + listToken.model.append({"tokenName": dapChainWalletsModel.get(currentIndex).tokens[i]}); if(listToken.model.count) listToken.currentIndex = 0; }