@ -234,21 +234,25 @@ void MainWindow::turnstileDoMigration(QString fromAddr) {
// Privacy level combobox
// Num tx over num blocks
QList < QPair < int , int > > privOptions ;
privOptions . push_back ( QPair < double , double > ( 3 , 6 ) ) ;
privOptions . push_back ( QPair < double , double > ( 5 , 10 ) ) ;
privOptions . push_back ( QPair < double , double > ( 10 , 20 ) ) ;
QList < std : : tuple < QString , int , int > > privOptions ;
privOptions . push_back ( std : : make_tuple < QString , int , int > ( " Good " , 3 , 57 6) ) ;
privOptions . push_back ( std : : make_tuple < QString , int , int > ( " Excellent " , 5 , 1152 ) ) ;
privOptions . push_back ( std : : make_tuple < QString , int , int > ( " Paranoid " , 10 , 23 04 ) ) ;
QObject : : connect ( turnstile . privLevel , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , [ = ] ( auto idx ) {
// Update the fees
turnstile . minerFee - > setText (
Settings : : getInstance ( ) - > getZECUSDDisplayFormat ( privOptions [ idx ] . first * Utils : : getMinerFee ( ) ) ) ;
Settings : : getInstance ( ) - > getZECUSDDisplayFormat ( std : : get < 1 > ( privOptions [ idx ] ) * Utils : : getMinerFee ( ) ) ) ;
} ) ;
turnstile . privLevel - > addItem ( " Good - 3 tx over 6 blocks " ) ;
turnstile . privLevel - > addItem ( " Excellent - 5 tx over 10 blocks " ) ;
turnstile . privLevel - > addItem ( " Paranoid - 10 tx over 20 blocks " ) ;
for ( auto i : privOptions ) {
turnstile . privLevel - > addItem ( std : : get < 0 > ( i ) % " - "
% QString : : number ( std : : get < 1 > ( i ) ) % " tx over "
% QString : : number ( std : : get < 2 > ( i ) ) % " blocks ( "
% QString : : number ( ( int ) ( std : : get < 2 > ( i ) / 24 / 24 ) ) % " days) " // 24 blks/hr * 24 hrs per day
) ;
}
turnstile . buttonBox - > button ( QDialogButtonBox : : Ok ) - > setText ( " Start " ) ;
if ( d . exec ( ) = = QDialog : : Accepted ) {
@ -256,7 +260,7 @@ void MainWindow::turnstileDoMigration(QString fromAddr) {
rpc - > getTurnstile ( ) - > planMigration (
turnstile . migrateZaddList - > currentText ( ) ,
turnstile . migrateTo - > currentText ( ) ,
privLevel . first , privLevel . second ) ;
std : : get < 1 > ( privLevel ) , std : : get < 2 > ( privLevel ) ) ;
QMessageBox : : information ( this , " Backup your wallet.dat " ,
" The migration will now start. You can check progress in the File -> Sapling Turnstile menu. \n \n YOU MUST BACKUP YOUR wallet.dat NOW! \n \n New Addresses have been added to your wallet which will be used for the migration. " ,
@ -585,7 +589,7 @@ void MainWindow::setupBalancesTab() {
} ) ;
}
if ( Settings : : getInstance ( ) - > isTestnet ( ) & & Settings : : getInstance ( ) - > is SproutAddress ( addr ) ) {
if ( Settings : : getInstance ( ) - > isSproutAddress ( addr ) ) {
menu . addAction ( " Migrate to Sapling " , [ = ] ( ) {
this - > turnstileDoMigration ( addr ) ;
} ) ;