From: tobtoht Date: Tue, 2 Jan 2024 16:41:51 +0000 (+0100) Subject: send: on failure to commit allow manual rebroadcast X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=68026ee29bfb1beb4bbcfacc8c66ba669063cccf;p=gamesguru%2Ffeather.git send: on failure to commit allow manual rebroadcast --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 049190e8..1f79f967 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -969,8 +969,24 @@ void MainWindow::onTransactionCommitted(bool success, PendingTransaction *tx, co m_wallet->setForceKeyImageSync(true); } if (error.contains("no connection to daemon")) { - auto button = QMessageBox::question(this, "Unable to send transaction", "No connection to node. Retry sending transaction?"); - if (button == QMessageBox::Yes) { + QMessageBox box(this); + box.setWindowTitle("Question"); + box.setText("Unable to send transaction"); + box.setInformativeText("No connection to node. Retry sending transaction?"); + QPushButton *manual = box.addButton("Broadcast manually", QMessageBox::HelpRole); + box.addButton(QMessageBox::No); + box.addButton(QMessageBox::Yes); + + box.exec(); + + if (box.clickedButton() == manual) { + if (txid.empty()) { + Utils::showError(this, "Unable to open tx broadcaster", "Cached transaction not found"); + return; + } + this->onResendTransaction(txid[0]); + } + else if (box.result() == QMessageBox::Yes) { m_wallet->commitTransaction(tx, m_wallet->tmpTxDescription); } return;