From b1b06989b7c49760683cfa4900c092e958d10f73 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sat, 17 Nov 2018 10:09:42 -0800 Subject: [PATCH] Discourage creation of new sprout addresses --- src/mainwindow.cpp | 8 ++++++++ src/mainwindow.ui | 17 ++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 52c49c1..758f203 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -841,6 +841,14 @@ 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()); // Make sure the RPC class reloads the z-addrs for future use diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 4aad812..8bee872 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -22,7 +22,7 @@ - 1 + 2 @@ -603,13 +603,6 @@ - - - - z-Addr(Sprout) - - - @@ -623,6 +616,13 @@ + + + + z-Addr(Sprout) + + + @@ -977,7 +977,6 @@ sendTransactionButton cancelSendButton balancesTable - rdioZAddr rdioTAddr listRecieveAddresses btnRecieveNewAddr