From 7ec2285df24014c89f245b0b6712d163c46c3323 Mon Sep 17 00:00:00 2001 From: gg Date: Sun, 18 Jan 2026 21:12:19 -0500 Subject: [PATCH] allow sending transactions when paused --- src/SendWidget.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/SendWidget.cpp b/src/SendWidget.cpp index e0ce2dea..cfc71c14 100644 --- a/src/SendWidget.cpp +++ b/src/SendWidget.cpp @@ -4,6 +4,8 @@ #include "SendWidget.h" #include "ui_SendWidget.h" +#include + #include "ColorScheme.h" #include "constants.h" #include "utils/AppData.h" @@ -11,6 +13,7 @@ #include "Icons.h" #include "libwalletqt/Wallet.h" #include "libwalletqt/WalletManager.h" +#include "WindowManager.h" #if defined(WITH_SCANNER) #include "wizard/offline_tx_signing/OfflineTxSigningWizard.h" @@ -143,6 +146,27 @@ void SendWidget::scanClicked() { } void SendWidget::sendClicked() { + if (conf()->get(Config::syncPaused).toBool()) { + QMessageBox msgBox(this); + msgBox.setIcon(QMessageBox::Warning); + msgBox.setWindowTitle("Are you sure? Create transaction?"); + msgBox.setText("Are you sure? Create transaction?"); + msgBox.setInformativeText("Wallet sync is paused. This may result in an invalid transaction or balance.\n\n• Go to File -> Settings -> Network -> Sync to resume sync."); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel | QMessageBox::Help); + msgBox.setDefaultButton(QMessageBox::Cancel); + + auto ret = msgBox.exec(); + + if (ret == QMessageBox::Help) { + WindowManager::instance()->showDocs(this, "synchronization"); + return; + } + + if (ret != QMessageBox::Ok) { + return; + } + } + if (!m_wallet->isConnected()) { Utils::showError(this, "Unable to create transaction", "Wallet is not connected to a node.", {"Wait for the wallet to automatically connect to a node.", "Go to File -> Settings -> Network -> Node to manually connect to a node."}, -- 2.52.0