Sticky Server and Note Automation as GUI setting
This commit is contained in:
@@ -35,8 +35,11 @@ Controller::Controller(MainWindow* main)
|
||||
auto current_server = Settings::getInstance()->getSettings().server;
|
||||
main->ui->current_server->setText(current_server);
|
||||
|
||||
auto stickyServer = Settings::getInstance()->getSettings().stickyServer;
|
||||
main->ui->sticky_server->setText( stickyServer ? "True" : "False" );
|
||||
bool isStickyServerEnabled = Settings::getInstance()->getUseStickyServer();
|
||||
qDebug() << "Sticky Server Status senden" << isStickyServerEnabled;
|
||||
main->ui->sticky_server->setText( isStickyServerEnabled ? "True" : "False" );
|
||||
|
||||
//auto stickyServer = Settings::getInstance()->getSettings().stickyServer;
|
||||
|
||||
// Setup balances table model
|
||||
balancesTableModel = new BalancesTableModel(main->ui->balancesTable);
|
||||
@@ -166,8 +169,6 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx)
|
||||
// Only for Debugging/Testing: How many free Notes are available?
|
||||
int spendableNotesCount = NoteCountDataStore::getInstance()->getSpendableNotesCount();
|
||||
QString addressWithMaxValue = NoteCountDataStore::getInstance()->getAddressWithMaxValue();
|
||||
|
||||
qDebug() << "Available notes over fee:" << spendableNotesCount;
|
||||
|
||||
// Clear NoteCountDataStore
|
||||
DataStore::getNoteCountDataStore()->clear();
|
||||
@@ -191,8 +192,12 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx)
|
||||
}
|
||||
CAmount balanceAvailable = getModel()->getBalVerified();
|
||||
|
||||
// Create more Notes if spendableNotesCount < 30 and enough funds are available
|
||||
if (spendableNotesCount < 30 && balanceAvailable.toDecimalString().toDouble() > (dustTransactions.size() * 0.0001)) {
|
||||
bool isNoteAutomationEnabled = Settings::getInstance()->getUseNoteAutomation();
|
||||
// Create more Notes if spendableNotesCount < 30 and enough funds are available and note automation is checked in settings tab
|
||||
|
||||
if (spendableNotesCount < 30 &&
|
||||
balanceAvailable.toDecimalString().toDouble() > (dustTransactions.size() * 0.0001) &&
|
||||
isNoteAutomationEnabled) {
|
||||
// Create extra transaction
|
||||
for (size_t i = 0; i < dustTransactions.size(); ++i) {
|
||||
// Generate random memo
|
||||
|
||||
Reference in New Issue
Block a user