Merge master
This commit is contained in:
@@ -42,7 +42,6 @@ public:
|
|||||||
|
|
||||||
QString doSendTxValidations(Tx tx);
|
QString doSendTxValidations(Tx tx);
|
||||||
void setDefaultPayFrom();
|
void setDefaultPayFrom();
|
||||||
RPC* getRPC() { return rpc; }
|
|
||||||
|
|
||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
|
|
||||||
|
|||||||
@@ -1022,13 +1022,7 @@ void RPC::checkForUpdate(bool silent) {
|
|||||||
QObject::tr("You already have the latest release v%1")
|
QObject::tr("You already have the latest release v%1")
|
||||||
.arg(currentVersion.toString()));
|
.arg(currentVersion.toString()));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if (!silent) {
|
|
||||||
QMessageBox::information(main, QObject::tr("No updates available"),
|
|
||||||
QObject::tr("You already have the latest release v%1")
|
|
||||||
.arg(currentVersion.toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
void sendZTransaction(json params, const std::function<void(json)>& cb, const std::function<void(QString)>& err);
|
void sendZTransaction(json params, const std::function<void(json)>& cb, const std::function<void(QString)>& err);
|
||||||
void watchTxStatus();
|
void watchTxStatus();
|
||||||
|
|
||||||
const QMap<QString, Tx> getWatchingTxns() { return watchingOps; }
|
const QMap<QString, WatchedTx> getWatchingTxns() { return watchingOps; }
|
||||||
void addNewTxToWatch(const QString& newOpid, WatchedTx wtx);
|
void addNewTxToWatch(const QString& newOpid, WatchedTx wtx);
|
||||||
|
|
||||||
const TxTableModel* getTransactionsModel() { return transactionsTableModel; }
|
const TxTableModel* getTransactionsModel() { return transactionsTableModel; }
|
||||||
|
|||||||
@@ -442,14 +442,17 @@ void AppDataServer::processSendTx(QJsonObject sendTx, MainWindow* mainwindow, QW
|
|||||||
std::cout << std::setw(2) << params << std::endl;
|
std::cout << std::setw(2) << params << std::endl;
|
||||||
|
|
||||||
// And send the Tx
|
// And send the Tx
|
||||||
mainwindow->getRPC()->sendZTransaction(params, [=](const json& reply) {
|
mainwindow->getRPC()->executeTransaction(tx,
|
||||||
QString opid = QString::fromStdString(reply.get<json::string_t>());
|
[=] (QString opid) {
|
||||||
|
|
||||||
// And then start monitoring the transaction
|
},
|
||||||
mainwindow->getRPC()->addNewTxToWatch(tx, opid);
|
[=] (QString opid, QString txid) {
|
||||||
|
|
||||||
// TODO: Handle the error if the computed Tx fails.
|
},
|
||||||
});
|
[=] (QString opid, QString errStr) {
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
auto r = QJsonDocument(QJsonObject{
|
auto r = QJsonDocument(QJsonObject{
|
||||||
{"version", 1.0},
|
{"version", 1.0},
|
||||||
@@ -498,10 +501,10 @@ void AppDataServer::processGetTransactions(MainWindow* mainWindow, QWebSocket* p
|
|||||||
txns.append(QJsonObject{
|
txns.append(QJsonObject{
|
||||||
{"type", "send"},
|
{"type", "send"},
|
||||||
{"datetime", QDateTime::currentSecsSinceEpoch()},
|
{"datetime", QDateTime::currentSecsSinceEpoch()},
|
||||||
{"amount", Settings::getDecimalString(wtxns[opid].toAddrs[0].amount)},
|
{"amount", Settings::getDecimalString(wtxns[opid].tx.toAddrs[0].amount)},
|
||||||
{"txid", ""},
|
{"txid", ""},
|
||||||
{"address", wtxns[opid].toAddrs[0].addr},
|
{"address", wtxns[opid].tx.toAddrs[0].addr},
|
||||||
{"memo", wtxns[opid].toAddrs[0].txtMemo},
|
{"memo", wtxns[opid].tx.toAddrs[0].txtMemo},
|
||||||
{"confirmations", 0}
|
{"confirmations", 0}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user