#include "SendWidget.h"
#include "ui_SendWidget.h"
+#include <QMessageBox>
+
#include "ColorScheme.h"
#include "constants.h"
#include "utils/AppData.h"
#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"
}
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("<b>Are you sure? Create transaction?</b>");
+ 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."},