TxBroadcast: close dialog on successful broadcast

This commit is contained in:
tobtoht 2023-01-19 16:24:18 +01:00
parent e5a61c6e2f
commit d9409615f3
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -46,15 +46,18 @@ void TxBroadcastDialog::broadcastTx() {
}
void TxBroadcastDialog::onApiResponse(const DaemonRpc::DaemonResponse &resp) {
if (resp.endpoint != DaemonRpc::Endpoint::SEND_RAW_TRANSACTION) {
return;
}
if (!resp.ok) {
QMessageBox::warning(this, "Transaction broadcast", resp.status);
return;
}
if (resp.endpoint == DaemonRpc::Endpoint::SEND_RAW_TRANSACTION) {
this->accept();
QMessageBox::information(this, "Transaction broadcast", "Transaction submitted successfully.\n\n"
"If the transaction belongs to this wallet it may take several minutes before it shows up in the history tab.");
}
}
TxBroadcastDialog::~TxBroadcastDialog() = default;