diff --git a/src/rpc.cpp b/src/rpc.cpp index a36ba7c..a0125e3 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -52,14 +52,13 @@ RPC::RPC(MainWindow* main) { }); timer->start(Settings::updateSpeed); + // Set up the timer to watch for tx status txTimer = new QTimer(main); QObject::connect(txTimer, &QTimer::timeout, [=]() { //qDebug() << "Watching tx status"; watchTxStatus(); }); - - txTimer->start(Settings::updateSpeed); qDebug() << __func__ << "Done settings up all timers"; usedAddresses = new QMap(); @@ -1180,8 +1179,10 @@ void RPC::watchTxStatus() { } if (watchingOps.isEmpty()) { - txTimer->start(Settings::updateSpeed); + // Stop the timer + txTimer->stop(); } else { + // Keep polling for updates txTimer->start(Settings::quickUpdateSpeed); } } diff --git a/src/sendtab.cpp b/src/sendtab.cpp index d185735..a56b72b 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -722,7 +722,7 @@ void MainWindow::sendButton() { qDebug() << "Computing opid: " << opid; }, - [=] (QString, QString txid) { + [=] (QString, QString txid) { ui->statusBar->showMessage(Settings::txidStatusMessage + " " + txid); connD->status->setText(tr("Done!")); @@ -737,7 +737,8 @@ void MainWindow::sendButton() { // And switch to the balances tab ui->tabWidget->setCurrentIndex(0); }); - // Force a UI update so we get the unconfirmed Tx + + // Force a UI update so we get the unconfirmed Tx rpc->refresh(true); }, [=] (QString opid, QString errStr) {