diff --git a/src/controller.cpp b/src/controller.cpp index f44ab0c..83de33c 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -153,22 +153,17 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) int sizerandomString = 512; const int randomStringLength = sizerandomString; - for(uint8_t i = 0; i < 8; i++) - { - + for(uint8_t i = 0; i < 8; i++) { QString randomString; - QRandomGenerator *gen = QRandomGenerator::system(); - for(int i=0; ibounded(0, possibleCharacters.length() - 1); - QChar nextChar = possibleCharacters.at(index); - randomString.append(nextChar); - } + for(int i=0; ibounded(0, possibleCharacters.length() - 1); + QChar nextChar = possibleCharacters.at(index); + randomString.append(nextChar); + } - dust.at(i)["memo"] = randomString.toStdString(); + dust.at(i)["memo"] = randomString.toStdString(); } @@ -176,12 +171,11 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) { it["amount"] = 0; } - // For each addr/amt/memo, construct the JSON and also build the confirm dialog box for (int i=0; i < tx.toAddrs.size(); i++) { - auto toAddr = tx.toAddrs[i]; + auto toAddr = tx.toAddrs[i]; rec["address"] = toAddr.addr.toStdString(); rec["amount"] = toAddr.amount.toqint64(); if (Settings::isZAddress(toAddr.addr) && !toAddr.memo.trimmed().isEmpty()) @@ -192,65 +186,50 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) int decider = rand() % 100 + 1 ; ; // random int between 1 and 100 -if (tx.toAddrs.size() < 2) -{ - -if(decider % 4 == 3) -{ - - allRecepients.insert(std::begin(allRecepients), { - dust.at(0), - dust.at(1), - dust.at(2), - dust.at(3), - dust.at(4), - dust.at(5) - - }) ; - -}else{ - - allRecepients.insert(std::begin(allRecepients), { - dust.at(0), - dust.at(1), - dust.at(2), - dust.at(3), - dust.at(4), - dust.at(5), - dust.at(6) - - }) ; - -} -}else{ - -if(decider % 4 == 3) -{ - - allRecepients.insert(std::begin(allRecepients), { - dust.at(0), - dust.at(1), - dust.at(2), - dust.at(3), - dust.at(4) - - - }) ; - -}else{ - - allRecepients.insert(std::begin(allRecepients), { - dust.at(0), - dust.at(1), - dust.at(2), - dust.at(3), - dust.at(4), - dust.at(5) - - }) ; - -} -} + if (tx.toAddrs.size() < 2) { + + if(decider % 4 == 3) { + allRecepients.insert(std::begin(allRecepients), { + dust.at(0), + dust.at(1), + dust.at(2), + dust.at(3), + dust.at(4), + dust.at(5) + }) ; + + } else { + allRecepients.insert(std::begin(allRecepients), { + dust.at(0), + dust.at(1), + dust.at(2), + dust.at(3), + dust.at(4), + dust.at(5), + dust.at(6) + }) ; + } + } else { + + if(decider % 4 == 3) { + allRecepients.insert(std::begin(allRecepients), { + dust.at(0), + dust.at(1), + dust.at(2), + dust.at(3), + dust.at(4) + }) ; + } else { + allRecepients.insert(std::begin(allRecepients), { + dust.at(0), + dust.at(1), + dust.at(2), + dust.at(3), + dust.at(4), + dust.at(5) + }) ; + } + } } diff --git a/src/settings.cpp b/src/settings.cpp index 59262db..a78880b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -277,14 +277,14 @@ QString Settings::getRandomServer() { QList servers; //TODO: This should be a much larger list which we randomly choose from servers[0] = "https://lite.hush.is"; - servers[1] = "https://miodrag.zone:9876"; - servers[2] = "https://hush.leto.net:5420"; - int x = rand() % 3; - return servers[1]; + servers[1] = "https://devo.crabdance.com"; + //servers[2] = "https://hush.leto.net:5420"; + int x = rand() % 2; + return servers[x]; } QString Settings::getDefaultServer() { - return "https://miodrag.zone:9876"; + return "https://lite.hush.is"; } void Settings::openAddressInExplorer(QString address) { @@ -302,7 +302,7 @@ const QString Settings::txidStatusMessage = QString(QObject::tr("Tx submitted (r QString Settings::getTokenName() { if (Settings::getInstance()->isTestnet()) { - return "HUSHT"; + return "TUSH"; } else { return "HUSH"; }