Handle edge cases for sapling activation

This commit is contained in:
Aditya Kulkarni
2018-10-28 22:36:49 -07:00
parent 887b78758d
commit e5d2ae7d9b
8 changed files with 83 additions and 43 deletions

View File

@@ -11,7 +11,7 @@ RPC::RPC(QNetworkAccessManager* client, MainWindow* main) {
this->main = main;
this->ui = main->ui;
this->turnstile = new Turnstile(this);
this->turnstile = new Turnstile(this, main);
// Setup balances table model
balancesTableModel = new BalancesTableModel(main->ui->balancesTable);
@@ -510,8 +510,13 @@ void RPC::refreshAddresses() {
// Function to create the data model and update the views, used below.
void RPC::updateUI(bool anyUnconfirmed) {
// See if the turnstile migration has any steps that need to be done.
turnstile->executeMigrationStep();
if (Settings::getInstance()->isTestnet()) {
// See if the turnstile migration has any steps that need to be done.
turnstile->executeMigrationStep();
} else {
// Not available on mainnet yet.
main->ui->actionTurnstile_Migration->setVisible(false);
}
ui->unconfirmedWarning->setVisible(anyUnconfirmed);