From 5c633dcbd58dc6f2ce24a6e4fc101c1debcdc854 Mon Sep 17 00:00:00 2001 From: adityapk00 Date: Sat, 17 Nov 2018 15:41:43 -0800 Subject: [PATCH] sprout confirm new addr --- src/mainwindow.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7a7961f..34eb791 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -860,13 +860,6 @@ void MainWindow::setupTransactionsTab() { } void MainWindow::addNewZaddr(bool sapling) { - if (!sapling) { - auto confirm = QMessageBox::question(this, "Sprout Address", - "Sprout addresses are inefficient, and will be deprecated in the future in favour of Sapling addresses.\n\n" - "Are you sure you want to create a new Sprout address?", QMessageBox::Yes, QMessageBox::No); - if (confirm != QMessageBox::Yes) - return; - } rpc->newZaddr(sapling, [=] (json reply) { QString addr = QString::fromStdString(reply.get()); @@ -951,6 +944,12 @@ void MainWindow::setupRecieveTab() { // Explicitly get new address button. QObject::connect(ui->btnRecieveNewAddr, &QPushButton::clicked, [=] () { if (ui->rdioZAddr->isChecked()) { + auto confirm = QMessageBox::question(this, "Sprout Address", + "Sprout addresses are inefficient, and will be deprecated in the future in favour of Sapling addresses.\n\n" + "Are you sure you want to create a new Sprout address?", QMessageBox::Yes, QMessageBox::No); + if (confirm != QMessageBox::Yes) + return; + addNewZaddr(false); } else if (ui->rdioZSAddr->isChecked()) { addNewZaddr(true);