Double opt in for custom fees

This commit is contained in:
Aditya Kulkarni
2018-11-15 17:05:10 -08:00
parent 9569601f8b
commit 4f99b1f752
6 changed files with 84 additions and 33 deletions

View File

@@ -375,6 +375,9 @@ void MainWindow::setupSettingsModal() {
// Save sent transactions
settings.chkSaveTxs->setChecked(Settings::getInstance()->getSaveZtxs());
// Custom fees
settings.chkCustomFees->setChecked(Settings::getInstance()->getAllowCustomFees());
// Connection Settings
QIntValidator validator(0, 65535);
settings.port->setValidator(&validator);
@@ -407,6 +410,13 @@ void MainWindow::setupSettingsModal() {
settings.tabWidget->setCurrentIndex(0);
if (settingsDialog.exec() == QDialog::Accepted) {
// Custom fees
bool customFees = settings.chkCustomFees->isChecked();
Settings::getInstance()->setAllowCustomFees(customFees);
ui->minerFeeAmt->setReadOnly(!customFees);
if (!customFees)
ui->minerFeeAmt->setText(Settings::getDecimalString(Settings::getMinerFee()));
if (zcashConfLocation.isEmpty()) {
// Save settings
Settings::getInstance()->saveSettings(