Propogate errors back

This commit is contained in:
adityapk00 2019-02-02 22:21:41 -08:00
parent 7644064c32
commit 77ebfb3add
1 changed files with 14 additions and 2 deletions

View File

@ -447,10 +447,22 @@ void AppDataServer::processSendTx(QJsonObject sendTx, MainWindow* mainwindow, QW
},
[=] (QString opid, QString txid) {
auto r = QJsonDocument(QJsonObject{
{"version", 1.0},
{"command", "sendTxSubmitted"},
{"txid", txid}
}).toJson();
if (pClient->isValid())
pClient->sendTextMessage(encryptOutgoing(r));
},
[=] (QString opid, QString errStr) {
auto r = QJsonDocument(QJsonObject{
{"version", 1.0},
{"command", "sendTxFailed"},
{"err", errStr}
}).toJson();
if (pClient->isValid())
pClient->sendTextMessage(encryptOutgoing(r));
}
);