From 8a297ab02e3d72901a3cf2f6965b5a28e79a09b2 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Wed, 22 May 2019 13:32:23 -0700 Subject: [PATCH] Use old migration if one is present --- src/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c9bd985..7c8dcc9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -381,11 +381,13 @@ void MainWindow::turnstileDoMigration(QString fromAddr) { void MainWindow::setupTurnstileDialog() { // Turnstile migration QObject::connect(ui->actionTurnstile_Migration, &QAction::triggered, [=] () { - // If the underlying zcashd has support for the migration, use that. - // Else, show the ZecWallet turnstile tool - if (rpc->getMigrationStatus()->available) { + // If the underlying zcashd has support for the migration and there is no existing migration + // in progress, use that. + if (rpc->getMigrationStatus()->available && !rpc->getTurnstile()->isMigrationPresent()) { Turnstile::showZcashdMigration(this); } else { + // Else, show the ZecWallet turnstile tool + // If there is current migration that is present, show the progress button if (rpc->getTurnstile()->isMigrationPresent()) turnstileProgress();