From 0907403db2df0355e5ee8e33bd12aeab10d6a549 Mon Sep 17 00:00:00 2001 From: adityapk00 Date: Sun, 18 Nov 2018 20:20:58 -0800 Subject: [PATCH] Sapling turnstile gaurd --- src/mainwindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c0b73a6..891efe5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -194,6 +194,12 @@ void MainWindow::turnstileDoMigration(QString fromAddr) { if (rpc->getAllZAddresses() == nullptr) return; + // If a migration is already in progress, show the progress dialog instead + if (rpc->getTurnstile()->isMigrationPresent()) { + turnstileProgress(); + return; + } + Ui_Turnstile turnstile; QDialog d(this); turnstile.setupUi(&d); @@ -481,12 +487,12 @@ void MainWindow::postToZBoard() { QMap topics; // Insert the main topic automatically - topics.insert("#Main_Area", Settings::getZboardAddr()); + topics.insert("#Main_Area", Settings::getInstance()->isTestnet() ? Settings::getDonationAddr(true) : Settings::getZboardAddr()); zb.topicsList->addItem(topics.firstKey()); // Then call the API to get topics, and if it returns successfully, then add the rest of the topics rpc->getZboardTopics([&](QMap topicsMap) { for (auto t : topicsMap.keys()) { - topics.insert(t, topicsMap[t]); + topics.insert(t, Settings::getInstance()->isTestnet() ? Settings::getDonationAddr(true) : topicsMap[t]); zb.topicsList->addItem(t); } });