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