Menu: remove 'Change restore height'

Restoring the wallet from seed is the preferred UX here. Missing
transactions should be imported using Tools -> Import transaction.
This commit is contained in:
tobtoht
2022-06-23 12:54:01 +02:00
parent 840d6a2b02
commit 08acac91f6
7 changed files with 0 additions and 115 deletions
-25
View File
@@ -253,7 +253,6 @@ void MainWindow::initMenu() {
connect(ui->actionRefresh_tabs, &QAction::triggered, [this]{m_ctx->refreshModels();});
connect(ui->actionRescan_spent, &QAction::triggered, this, &MainWindow::rescanSpent);
connect(ui->actionWallet_cache_debug, &QAction::triggered, this, &MainWindow::showWalletCacheDebugDialog);
connect(ui->actionChange_restore_height, &QAction::triggered, this, &MainWindow::showRestoreHeightDialog);
// [Wallet] -> [Advanced] -> [Export]
connect(ui->actionExportOutputs, &QAction::triggered, this, &MainWindow::exportOutputs);
@@ -394,7 +393,6 @@ void MainWindow::initWalletContext() {
connect(m_ctx.get(), &AppContext::deviceButtonPressed, this, &MainWindow::onDeviceButtonPressed);
connect(m_ctx.get(), &AppContext::initiateTransaction, this, &MainWindow::onInitiateTransaction);
connect(m_ctx.get(), &AppContext::endTransaction, this, &MainWindow::onEndTransaction);
connect(m_ctx.get(), &AppContext::customRestoreHeightSet, this, &MainWindow::onCustomRestoreHeightSet);
connect(m_ctx.get(), &AppContext::keysCorrupted, this, &MainWindow::onKeysCorrupted);
connect(m_ctx.get(), &AppContext::selectedInputsChanged, this, &MainWindow::onSelectedInputsChanged);
@@ -787,22 +785,6 @@ void MainWindow::updatePasswordIcon() {
m_statusBtnPassword->setIcon(icon);
}
void MainWindow::showRestoreHeightDialog() {
// settings custom restore height is only available for 25 word seeds
auto seedLength = m_ctx->wallet->seedLength();
if (seedLength == 14 || seedLength == 16) { // TODO: update this warning (import tx, delete cache, restore from seed)
const auto msg = "This wallet has a mnemonic seed with an embedded restore height.";
QMessageBox::warning(this, "Cannot set custom restore height", msg);
return;
}
RestoreHeightDialog dialog{this, m_ctx->wallet->getWalletCreationHeight()};
if (dialog.exec() == QDialog::Accepted) {
int restoreHeight = dialog.getHeight();
m_ctx->onSetRestoreHeight(restoreHeight);
}
}
void MainWindow::showKeysDialog() {
if (!this->verifyPassword()) {
return;
@@ -1445,13 +1427,6 @@ void MainWindow::onEndTransaction() {
}
}
void MainWindow::onCustomRestoreHeightSet(int height) {
auto msg = QString("The restore height for this wallet has been set to %1. "
"Please re-open the wallet. Feather will now quit.").arg(height);
QMessageBox::information(this, "Cannot set custom restore height", msg);
this->menuQuitClicked();
}
void MainWindow::onKeysCorrupted() {
if (!m_criticalWarningShown) {
m_criticalWarningShown = true;