|
|
@ -132,7 +132,7 @@ void Controller::setConnection(Connection* c) |
|
|
|
} |
|
|
|
|
|
|
|
// Build the RPC JSON Parameters for this tx
|
|
|
|
void Controller::fillTxJsonParams(json& allRecepients, Tx tx) |
|
|
|
void Controller::fillTxJsonParams(json& allRecepients, Tx tx, bool isChatMessage) |
|
|
|
{ |
|
|
|
Q_ASSERT(allRecepients.is_array()); |
|
|
|
|
|
|
@ -194,7 +194,8 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) |
|
|
|
|
|
|
|
if (spendableNotesCount < 30 && |
|
|
|
balanceAvailable.toDecimalString().toDouble() > (dustTransactions.size() * 0.0001) && |
|
|
|
isNoteAutomationEnabled) { |
|
|
|
isNoteAutomationEnabled && |
|
|
|
isChatMessage) { |
|
|
|
// Create extra transaction
|
|
|
|
for (size_t i = 0; i < dustTransactions.size(); ++i) { |
|
|
|
// Generate random memo
|
|
|
@ -1506,7 +1507,7 @@ void Controller::unlockIfEncrypted(std::function<void(void)> cb, std::function<v |
|
|
|
*/ |
|
|
|
void Controller::executeStandardUITransaction(Tx tx) |
|
|
|
{ |
|
|
|
executeTransaction(tx, [=] (QString txid) { |
|
|
|
executeTransaction(tx,false, [=] (QString txid) { |
|
|
|
ui->statusBar->showMessage(Settings::txidStatusMessage + " " + txid); |
|
|
|
}, |
|
|
|
[=] (QString opid, QString errStr) { |
|
|
@ -1528,7 +1529,7 @@ void Controller::executeStandardUITransaction(Tx tx) |
|
|
|
} |
|
|
|
|
|
|
|
// Execute a transaction!
|
|
|
|
void Controller::executeTransaction(Tx tx, |
|
|
|
void Controller::executeTransaction(Tx tx, bool isChatMessage, |
|
|
|
const std::function<void(QString txid)> submitted, |
|
|
|
const std::function<void(QString txid, QString errStr)> error) |
|
|
|
{ |
|
|
@ -1538,7 +1539,7 @@ void Controller::executeTransaction(Tx tx, |
|
|
|
unlockIfEncrypted([=] () { |
|
|
|
// First, create the json params
|
|
|
|
json params = json::array(); |
|
|
|
fillTxJsonParams(params, tx); |
|
|
|
fillTxJsonParams(params, tx, isChatMessage); |
|
|
|
std::cout << std::setw(2) << params << std::endl; |
|
|
|
|
|
|
|
zrpc->sendTransaction(QString::fromStdString(params.dump()), [=](const json& reply) { |
|
|
|