diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 60d0ef4..4681e3f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -433,15 +433,16 @@ void MainWindow::initMenu() {
connect(ui->actionPassword, &QAction::triggered, this, &MainWindow::showPasswordDialog);
connect(ui->actionKeys, &QAction::triggered, this, &MainWindow::showKeysDialog);
connect(ui->actionViewOnly, &QAction::triggered, this, &MainWindow::showViewOnlyDialog);
- connect(ui->actionStore_wallet, &QAction::triggered, [&]{
+ connect(ui->actionStore_wallet, &QAction::triggered, [this]{
m_ctx->currentWallet->store();
});
- connect(ui->actionRefresh_tabs, &QAction::triggered, [&]{
+ connect(ui->actionRefresh_tabs, &QAction::triggered, [this]{
m_ctx->refreshModels();
});
- connect(ui->actionUpdate_balance, &QAction::triggered, [&]{
+ connect(ui->actionUpdate_balance, &QAction::triggered, [this]{
m_ctx->updateBalance();
});
+ connect(ui->actionRescan_spent, &QAction::triggered, this, &MainWindow::rescanSpent);
connect(ui->actionExportKeyImages, &QAction::triggered, this, &MainWindow::exportKeyImages);
connect(ui->actionImportKeyImages, &QAction::triggered, this, &MainWindow::importKeyImages);
connect(ui->actionExportOutputs, &QAction::triggered, this, &MainWindow::exportOutputs);
@@ -1302,6 +1303,14 @@ void MainWindow::updateNetStats() {
m_statusLabelNetStats->setText(QString("(D: %1)").arg(Utils::formatBytes(m_ctx->currentWallet->getBytesReceived())));
}
+void MainWindow::rescanSpent() {
+ if (!m_ctx->currentWallet->rescanSpent()) {
+ QMessageBox::warning(this, "Rescan spent", m_ctx->currentWallet->errorString());
+ } else {
+ QMessageBox::information(this, "Rescan spent", "Successfully rescanned spent outputs.");
+ }
+}
+
MainWindow::~MainWindow() {
delete ui;
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index b5e2496..77128b9 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -167,6 +167,7 @@ private:
void touchbarShowWallet();
void updatePasswordIcon();
void updateNetStats();
+ void rescanSpent();
WalletWizard *createWizard(WalletWizard::Page startPage);
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 2812b5a..334d5f2 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -429,6 +429,7 @@
+
@@ -734,6 +735,11 @@
Show Exchange
+
+
+ Rescan spent
+
+