6 #include "ui_optionspage.h"
27 #include <QItemSelection>
28 #include <QMessageBox>
30 #include <QTextDocument>
31 #include <QDataWidgetMapper>
32 #include <QDoubleValidator>
34 #include <QTextStream>
37 OptionsPage::OptionsPage(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint),
45 mapper =
new QDataWidgetMapper(
this);
46 mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
48 ui->toggleTheme->setState(
settings.value(
"theme")!=
"webwallet");
51 connect(
ui->lineEditNewPass, SIGNAL(textChanged(
const QString &)),
this, SLOT(
validateNewPass()));
53 connect(
ui->lineEditOldPass, SIGNAL(textChanged(
const QString &)),
this, SLOT(
onOldPassChanged()));
55 QLocale lo(QLocale::C);
56 lo.setNumberOptions(QLocale::RejectGroupSeparator);
57 QDoubleValidator *dblVal =
new QDoubleValidator(0, 250000000, 0,
ui->lineEditWithhold);
58 dblVal->setNotation(QDoubleValidator::StandardNotation);
59 dblVal->setLocale(lo);
60 ui->lineEditWithhold->setValidator(dblVal);
61 ui->lineEditWithhold->setPlaceholderText(
"PRCY Amount");
90 ui->labelStaking->show();
91 ui->toggleStaking->show();
92 ui->reservegroupBox->show();
93 ui->lineEditWithhold->show();
94 ui->addNewFunds->show();
95 ui->pushButtonSave->show();
96 ui->pushButtonDisable->show();
99 ui->labelStaking->hide();
100 ui->toggleStaking->hide();
101 ui->reservegroupBox->hide();
102 ui->lineEditWithhold->hide();
103 ui->addNewFunds->hide();
104 ui->pushButtonSave->hide();
105 ui->pushButtonDisable->hide();
109 connect(
ui->pushButtonRecovery, SIGNAL(clicked()),
this, SLOT(
onShowMnemonic()));
117 ui->toggle2FA->setState(twoFAStatus);
120 int digits =
settings.value(
"2fadigits").toInt();
122 ui->comboBox->setCurrentIndex(1);
123 }
else if (digits == 6) {
124 ui->comboBox->setCurrentIndex(0);
126 connect(
ui->comboBox, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
changeDigits(
int)));
127 connect(
ui->btn_day, SIGNAL(clicked()),
this, SLOT(
on_day()));
128 connect(
ui->btn_week, SIGNAL(clicked()),
this, SLOT(
on_week()));
129 connect(
ui->btn_month, SIGNAL(clicked()),
this, SLOT(
on_month()));
131 ui->lblAuthCode->setVisible(
false);
132 ui->code_1->setVisible(
false);
133 ui->code_2->setVisible(
false);
134 ui->code_3->setVisible(
false);
135 ui->code_4->setVisible(
false);
136 ui->code_5->setVisible(
false);
137 ui->code_6->setVisible(
false);
142 ui->addNewFunds->setChecked(isConsolidatedOn);
145 ui->addNewFunds->setChecked(
false);
146 ui->addNewFunds->setEnabled(
false);
147 QFont font =
ui->addNewFunds->font();
148 font.setStrikeOut(
true);
149 ui->addNewFunds->setFont(font);
150 ui->addNewFunds->setToolTip(
"Disabled by default due to controlling Masternode(s) from this wallet.\nEnabling this will incur a maximum 0.1 PRCY fee each time you receive a new deposit that needs to be consolidated for staking.");
152 ui->mapPortUpnp->setChecked(
settings.value(
"fUseUPnP",
false).toBool());
153 ui->minimizeToTray->setChecked(
settings.value(
"fMinimizeToTray",
false).toBool());
154 ui->minimizeOnClose->setChecked(
settings.value(
"fMinimizeOnClose",
false).toBool());
155 ui->alwaysRequest2FA->setChecked(
settings.value(
"fAlwaysRequest2FA",
false).toBool());
156 ui->alwaysRequestPassphrase->setChecked(
settings.value(
"fAlwaysRequestPassphrase",
false).toBool());
157 ui->hideBalanceStaking->setChecked(
settings.value(
"fHideBalance",
false).toBool());
158 ui->lockSendStaking->setChecked(
settings.value(
"fLockSendStaking",
false).toBool());
159 ui->displayCurrencyValue->setChecked(
settings.value(
"fDisplayCurrencyValue",
false).toBool());
160 ui->defaultCurrency->setCurrentText(
settings.value(
"strDefaultCurrency").toString());
169 connect(
ui->defaultCurrency, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
setDefaultCurrency(
int)));
188 static inline int64_t roundint64(
double d)
190 return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
194 double dAmount =
ui->lineEditWithhold->text().toDouble();
195 CAmount nAmount = roundint64(dAmount * COIN);
207 QWidget::resizeEvent(event);
211 double dAmount =
ui->lineEditWithhold->text().toDouble();
212 if (
ui->lineEditWithhold->text().trimmed().isEmpty()) {
213 ui->lineEditWithhold->setStyleSheet(
"border: 2px solid red");
215 msgBox.setWindowTitle(
"Reserve Balance Empty");
216 msgBox.setText(
"PRCY reserve amount is empty and must be a minimum of 1.\nPlease click Disable if you would like to turn it off.");
218 msgBox.setIcon(QMessageBox::Information);
222 if (dAmount < 0.0 || dAmount > 250000000) {
224 msgBox.setWindowTitle(
"Invalid Reserve Amount");
225 msgBox.setText(
"The amount you have attempted to keep as spendable is greater than the 250,000,000 (250M) limit. Please try a smaller amount.");
227 msgBox.setIcon(QMessageBox::Warning);
239 QString reserveBalance =
ui->lineEditWithhold->text().trimmed();
241 msgBox.setWindowTitle(
"Reserve Balance Set");
242 msgBox.setText(
"Reserve balance of " + reserveBalance +
" PRCY is successfully set.");
244 msgBox.setIcon(QMessageBox::Information);
249 ui->lineEditWithhold->setText(
"0");
256 msgBox.setWindowTitle(
"Reserve Balance Disabled");
257 msgBox.setText(
"Reserve balance disabled.");
259 msgBox.setIcon(QMessageBox::Information);
266 this->QDialog::keyPressEvent(event);
275 if ( (!
ui->lineEditNewPass->text().length()) || (!
ui->lineEditNewPassRepeat->text().length()) ) {
277 msgBox.setWindowTitle(
"Wallet Encryption Failed");
278 msgBox.setText(
"The passphrase entered for wallet encryption was empty or contained spaces. Please try again.");
280 msgBox.setIcon(QMessageBox::Critical);
286 oldPass.reserve(MAX_PASSPHRASE_SIZE);
287 oldPass.assign(
ui->lineEditOldPass->text().toStdString().c_str() );
289 newPass.reserve(MAX_PASSPHRASE_SIZE);
290 newPass.assign(
ui->lineEditNewPass->text().toStdString().c_str() );
293 newPass2.reserve(MAX_PASSPHRASE_SIZE);
294 newPass2.assign(
ui->lineEditNewPassRepeat->text().toStdString().c_str() );
296 bool success =
false;
298 if (newPass == newPass2) {
301 if (oldPass == newPass) {
303 msgBox.setWindowTitle(
"Wallet Encryption Failed");
304 msgBox.setText(
"The passphrase you have entered is the same as your old passphrase. Please use a different passphrase if you would like to change it.");
306 msgBox.setIcon(QMessageBox::Critical);
309 else if (newPass.length() < 10) {
311 msgBox.setWindowTitle(
"Wallet Encryption Failed");
312 msgBox.setText(
"The passphrase's length has to be more than 10. Please try again.");
314 msgBox.setIcon(QMessageBox::Critical);
319 msgBox.setWindowTitle(
"Wallet Encryption Failed");
320 msgBox.setText(
"The passphrase must contain lower, upper, digit, symbol. Please try again.");
322 msgBox.setIcon(QMessageBox::Critical);
327 msgBox.setWindowTitle(
"Wallet Encryption Failed");
328 msgBox.setText(
"The passphrase is too weak. You must use a minimum passphrase length of 10 characters and use uppercase letters, lowercase letters, numbers, and symbols. Please try again.");
330 msgBox.setIcon(QMessageBox::Critical);
335 msgBox.setWindowTitle(
"Passphrase Change Successful");
336 msgBox.setText(
"Wallet passphrase was successfully changed.\nPlease remember your passphrase as there is no way to recover it.");
338 msgBox.setIcon(QMessageBox::Information);
344 msgBox.setWindowTitle(
"Wallet Encryption Failed");
345 msgBox.setText(
"The passphrases entered for wallet encryption do not match. Please try again.");
347 msgBox.setIcon(QMessageBox::Critical);
352 ui->pushButtonPassword->setStyleSheet(
"border: 2px solid green");
353 else ui->pushButtonPassword->setStyleSheet(
"border: 2px solid red");
354 ui->pushButtonPassword->repaint();
359 ui->lineEditOldPass->clear();
360 ui->lineEditNewPass->clear();
361 ui->lineEditNewPassRepeat->clear();
369 tr(
"Backup Wallet"), QString(),
370 tr(
"Wallet Data (*.dat)"), NULL);
372 if (filename.isEmpty())
376 ui->pushButtonBackup->setStyleSheet(
"border: 2px solid green");
378 msgBox.setWindowTitle(
"Wallet Backup Successful");
379 msgBox.setText(
"Wallet has been successfully backed up to " + filename);
381 msgBox.setIcon(QMessageBox::Information);
384 ui->pushButtonBackup->setStyleSheet(
"border: 2px solid red");
386 msgBox.setWindowTitle(
"Wallet Backup Failed");
387 msgBox.setText(
"Wallet backup failed. Please try again.");
389 msgBox.setIcon(QMessageBox::Critical);
392 ui->pushButtonBackup->repaint();
397 if (!
ui->lineEditNewPass->text().length())
398 ui->lineEditNewPass->setStyleSheet(
"border-color: red");
401 ui->lineEditNewPass->repaint();
412 ui->lineEditOldPass->setStyleSheet(stylesheet);
413 ui->lineEditOldPass->repaint();
414 ui->pushButtonPassword->setStyleSheet(stylesheet);
415 ui->pushButtonPassword->repaint();
416 if (!
ui->lineEditNewPass->text().length())
417 ui->lineEditNewPass->setStyleSheet(
"border-color: red");
418 ui->lineEditNewPass->repaint();
423 if (
ui->lineEditNewPass->text()==
ui->lineEditNewPassRepeat->text())
426 ui->lineEditNewPassRepeat->repaint();
430 ui->lineEditNewPassRepeat->setStyleSheet(
"border-color: red");
431 ui->lineEditNewPassRepeat->repaint();
440 msgBox.setWindowTitle(
"Staking Disabled - Syncing Masternode list");
441 msgBox.setText(
"Enable Staking is disabled when you are still syncing the Masternode list as this is required. Please allow the wallet to fully sync this list before attempting to Enable Staking.");
443 msgBox.setIcon(QMessageBox::Warning);
450 msgBox.setWindowTitle(
"Staking Setting");
451 msgBox.setIcon(QMessageBox::Information);
452 msgBox.setText(
"Please unlock the wallet with your passphrase before changing this setting.");
462 msg.sprintf(
"PoW blocks are still being mined.\nPlease wait until Block %d.",
Params().LAST_POW_BLOCK());
464 msgBox.setWindowTitle(
"Information");
465 msgBox.setIcon(QMessageBox::Information);
478 std::string errorMessage;
485 errorMessage =
"Your stakeable balance is under the threshold of 2500 PRCY. Please deposit more PRCY into your account in order to enable staking.";
487 errorMessage =
"Your balance requires a consolidation transaction which incurs a fee of between " +
FormatMoney(minFee) +
" to " +
FormatMoney(maxFee) +
" PRCY. However after that transaction fee, your balance will be below the staking threshold of 2500 PRCY. Please deposit more PRCY into your account or reduce your reserved amount in order to enable staking.";
489 errorMessage =
"Your stakeable balance is under the threshold of 2500 PRCY. This is due to your reserve balance being too high. Please deposit more PRCY into your account or reduce your reserved amount in order to enable staking.";
493 errorMessage =
"Your stakeable balance is under the threshold of 2500 PRCY. This is due to your reserve balance of " +
FormatMoney(
nReserveBalance) +
" PRCY being too high. The wallet software has tried to consolidate your funds with the reserve balance but without success because of a consolidation fee of " +
FormatMoney(totalFee) +
" PRCY. Please wait around 10 minutes for the wallet to resolve the reserve to enable staking.";
495 QString msg = QString::fromStdString(errorMessage);
496 msgBox.setWindowTitle(
"Warning: Staking Issue");
497 msgBox.setIcon(QMessageBox::Warning);
517 QMessageBox::StandardButton reply;
519 errorMessage =
"In order to enable staking with 100% of your current balance, your previous PRCY deposits must be consolidated and reorganized. This will incur a fee of between " +
FormatMoney(minFee) +
" to " +
FormatMoney(maxFee) +
" PRCY.\n\nWould you like to do this?";
521 errorMessage =
"In order to enable staking with 100% of your current balance except the reserve balance, your previous PRCY deposits must be consolidated and reorganized. This will incur a fee of between " +
FormatMoney(minFee) +
" to " +
FormatMoney(maxFee) +
" PRCY.\n\nWould you like to do this?";
523 reply = QMessageBox::question(
this,
"Staking Needs Consolidation", QString::fromStdString(errorMessage), QMessageBox::Yes|QMessageBox::No|QMessageBox::Ignore);
524 if (reply == QMessageBox::Yes) {
531 bool success =
false;
538 minStakingAmount, nTime);
541 QString msg =
"Consolidation transaction created!";
543 msgBox.setWindowTitle(
"Information");
544 msgBox.setIcon(QMessageBox::Information);
549 }
catch (
const std::exception& err) {
550 LogPrintf(
"Sweeping failed, will be done automatically when coins become mature");
553 }
else if (reply == QMessageBox::No) {
649 msgBox.setWindowTitle(
"2FA Setting");
650 msgBox.setIcon(QMessageBox::Information);
651 msgBox.setText(
"Please unlock the wallet with your passphrase before changing this setting.");
655 ui->toggle2FA->setState(!
ui->toggle2FA->getState());
661 qrdlg.setWindowTitle(
"2FA QR Code & Recovery Key");
670 codedlg.setWindowTitle(
"2FA Code Verification");
678 if(result == QDialog::Accepted){
680 codedlg.setWindowTitle(
"2FA Code Verification");
682 connect(&codedlg, SIGNAL(finished (
int)),
this, SLOT(
dialogIsFinished(
int)));
686 if (result == QDialog::Rejected)
687 ui->toggle2FA->setState(
false);
692 if(result == QDialog::Accepted){
694 QDateTime current = QDateTime::currentDateTime();
699 msgBox.setWindowTitle(
"SUCCESS!");
700 msgBox.setIcon(QMessageBox::Information);
701 msgBox.setText(
"Two-factor authentication has been successfully enabled.");
706 if (result == QDialog::Rejected)
707 ui->toggle2FA->setState(
false);
714 else settings.setValue(
"theme",
"webwallet");
719 ui->code_1->setText(
"");
720 ui->code_2->setText(
"");
721 ui->code_3->setText(
"");
722 ui->code_4->setText(
"");
723 ui->code_5->setText(
"");
724 ui->code_6->setText(
"");
726 ui->label_3->setEnabled(
false);
727 ui->lblAuthCode->setEnabled(
false);
728 ui->btn_day->setEnabled(
false);
729 ui->btn_week->setEnabled(
false);
730 ui->btn_month->setEnabled(
false);
732 ui->btn_day->setStyleSheet(
"border-color: none;");
733 ui->btn_week->setStyleSheet(
"border-color: none;");
734 ui->btn_month->setStyleSheet(
"border-color: none;");
739 ui->label_3->setEnabled(
true);
740 ui->lblAuthCode->setEnabled(
true);
741 ui->btn_day->setEnabled(
true);
742 ui->btn_week->setEnabled(
true);
743 ui->btn_month->setEnabled(
true);
748 memcpy(chrlist, code.toUtf8().data(), 6);
750 value.sprintf(
"%c", chrlist[0]);
751 ui->code_1->setText(value);
752 value.sprintf(
"%c", chrlist[1]);
753 ui->code_2->setText(value);
754 value.sprintf(
"%c", chrlist[2]);
755 ui->code_3->setText(value);
756 value.sprintf(
"%c", chrlist[3]);
757 ui->code_4->setText(value);
758 value.sprintf(
"%c", chrlist[4]);
759 ui->code_5->setText(value);
760 value.sprintf(
"%c", chrlist[5]);
761 ui->code_6->setText(value);
767 ui->btn_day->setStyleSheet(
"border-color: green;");
770 else if (period == 7) {
771 ui->btn_week->setStyleSheet(
"border-color: green;");
774 else if (period == 30) {
775 ui->btn_month->setStyleSheet(
"border-color: green;");
781 if(result == QDialog::Accepted){
784 ui->btn_day->setStyleSheet(
"border-color: green;");
785 ui->btn_week->setStyleSheet(
"border-color: white;");
786 ui->btn_month->setStyleSheet(
"border-color: white;");
789 ui->btn_day->setStyleSheet(
"border-color: white;");
790 ui->btn_week->setStyleSheet(
"border-color: green;");
791 ui->btn_month->setStyleSheet(
"border-color: white;");
794 ui->btn_day->setStyleSheet(
"border-color: white;");
795 ui->btn_week->setStyleSheet(
"border-color: white;");
796 ui->btn_month->setStyleSheet(
"border-color: green;");
806 if (result == QDialog::Rejected)
807 ui->toggle2FA->setState(
true);
814 codedlg.setWindowTitle(
"2FA Code Verification");
824 codedlg.setWindowTitle(
"2FA Code Verification");
834 codedlg.setWindowTitle(
"2FA Code Verification");
849 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
850 msgBox.setIcon(QMessageBox::Information);
851 msgBox.setText(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.");
854 LogPrintf(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.\n");
859 LogPrintf(
"Attempt to view Mnemonic Phrase successful.\n");
862 QMessageBox::StandardButton reply;
863 reply = QMessageBox::question(
this,
"Are You Sure?",
"Are you sure you would like to view your Mnemonic Phrase?\nYou will be required to enter your passphrase. Failed or canceled attempts will be logged.", QMessageBox::Yes|QMessageBox::No);
864 if (reply == QMessageBox::Yes) {
869 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
870 msgBox.setIcon(QMessageBox::Information);
871 msgBox.setText(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.");
874 LogPrintf(
"Attempt to view Mnemonic Phrase failed or canceled. Wallet locked for security.\n");
879 LogPrintf(
"Attempt to view Mnemonic Phrase successful.\n");
882 LogPrintf(
"Attempt to view Mnemonic Phrase canceled.\n");
887 std::string recoverySeedPhrase =
"";
889 phrase = QString::fromStdString(recoverySeedPhrase);
893 QPushButton *copyButton = msgBox.addButton(tr(
"Copy"), QMessageBox::ActionRole);
894 QPushButton *okButton = msgBox.addButton(tr(
"OK"), QMessageBox::ActionRole);
895 copyButton->setStyleSheet(
"background:transparent;");
896 copyButton->setIcon(QIcon(
":/icons/editcopy"));
897 msgBox.setWindowTitle(
"Mnemonic Recovery Phrase");
898 msgBox.setText(
"Below is your Mnemonic Recovery Phrase, consisting of 24 seed words. Please copy/write these words down in order. We strongly recommend keeping multiple copies in different locations.");
899 msgBox.setInformativeText(
"\n<b>" + phrase +
"</b>");
903 if (msgBox.clickedButton() == copyButton) {
926 if (
ui->mapPortUpnp->isChecked()) {
927 settings.setValue(
"fUseUPnP",
true);
929 settings.setValue(
"fUseUPnP",
false);
932 msgBox.setWindowTitle(
"UPNP Settings");
933 msgBox.setIcon(QMessageBox::Information);
934 msgBox.setText(
"UPNP Settings successfully changed. Please restart the wallet for changes to take effect.");
941 if (
ui->minimizeToTray->isChecked()) {
942 settings.setValue(
"fMinimizeToTray",
true);
944 settings.setValue(
"fMinimizeToTray",
false);
950 if (
ui->minimizeOnClose->isChecked()) {
951 settings.setValue(
"fMinimizeOnClose",
true);
953 settings.setValue(
"fMinimizeOnClose",
false);
962 QMessageBox::StandardButton reply;
963 reply = QMessageBox::question(
this,
"Are You Sure?",
"2FA is currently activated. Are you sure you would like to change the number of digits anyway?\nThis is not recommended unless you know what you are doing.", QMessageBox::Yes|QMessageBox::No);
964 if (reply == QMessageBox::Yes) {
965 digit =
ui->comboBox->currentText().toInt();
966 settings.setValue(
"2fadigits", digit);
968 msgBox.setWindowTitle(
"2FA Digit Settings");
969 msgBox.setIcon(QMessageBox::Information);
970 msgBox.setText(
"2FA Digit Settings have been changed successfully.");
976 msgBox.setWindowTitle(
"2FA Digit Settings");
977 msgBox.setIcon(QMessageBox::Information);
978 msgBox.setText(
"2FA Digit Settings have not been changed.");
984 digit =
ui->comboBox->currentText().toInt();
985 settings.setValue(
"2fadigits", digit);
993 if (twofastatus &&
ui->alwaysRequest2FA->isChecked()) {
994 settings.setValue(
"fAlwaysRequest2FA",
true);
996 settings.setValue(
"fAlwaysRequest2FA",
false);
1003 if (
ui->alwaysRequestPassphrase->isChecked()) {
1004 settings.setValue(
"fAlwaysRequestPassphrase",
true);
1006 settings.setValue(
"fAlwaysRequestPassphrase",
false);
1012 if (
ui->hideBalanceStaking->isChecked()) {
1013 settings.setValue(
"fHideBalance",
true);
1015 QMessageBox::StandardButton reply;
1016 reply = QMessageBox::question(
this,
"Are You Sure?",
"Are you sure you would like to disable your 'Hide Balance when unlocked'?\nYou will be required to enter your passphrase. Failed or canceled attempts will be logged.", QMessageBox::Yes|QMessageBox::No);
1017 if (reply == QMessageBox::Yes) {
1022 msgBox.setWindowTitle(
"Hide Balance When Unlocked");
1023 msgBox.setIcon(QMessageBox::Information);
1024 msgBox.setText(
"Attempt to Disable 'Hide Balance when unlocked' failed or canceled. Wallet Locked for security.");
1027 LogPrintf(
"Attempt to Disable 'Hide Balance when unlocked' failed or canceled. Wallet Locked for security.\n");
1028 settings.setValue(
"fHideBalance",
true);
1029 ui->hideBalanceStaking->setChecked(
true);
1034 settings.setValue(
"fHideBalance",
false);
1035 LogPrintf(
"Disable 'Hide Balance when unlocked' successful.\n");
1038 LogPrintf(
"Attempt to Disable 'Hide Balance when unlocked' canceled.\n");
1039 settings.setValue(
"fHideBalance",
true);
1040 ui->hideBalanceStaking->setChecked(
true);
1048 if (
ui->lockSendStaking->isChecked()) {
1049 settings.setValue(
"fLockSendStaking",
true);
1051 QMessageBox::StandardButton reply;
1052 reply = QMessageBox::question(
this,
"Are You Sure?",
"Are you sure you would like to disable your Lock Send Tab when unlocked?\nYou will be required to enter your passphrase. Failed or canceled attempts will be logged.", QMessageBox::Yes|QMessageBox::No);
1053 if (reply == QMessageBox::Yes) {
1058 msgBox.setWindowTitle(
"Lock Send Tab When Unlocked");
1059 msgBox.setIcon(QMessageBox::Information);
1060 msgBox.setText(
"Attempt to Disable 'Lock Send Tab when unlocked' failed or canceled. Wallet Locked for security.");
1063 LogPrintf(
"Attempt to Disable 'Lock Send Tab when unlocked' failed or canceled. Wallet Locked for security.\n");
1064 settings.setValue(
"fLockSendStaking",
true);
1065 ui->lockSendStaking->setChecked(
true);
1070 settings.setValue(
"fLockSendStaking",
false);
1071 LogPrintf(
"Disable 'Lock Send Tab when unlocked' successful.\n");
1074 LogPrintf(
"Attempt to Disable 'Lock Send Tab when unlocked' canceled.\n");
1075 settings.setValue(
"fLockSendStaking",
true);
1076 ui->lockSendStaking->setChecked(
true);
1086 if (
ui->displayCurrencyValue->isChecked()) {
1087 settings.setValue(
"fDisplayCurrencyValue",
true);
1089 if (!
settings.contains(
"strDefaultCurrency"))
1090 settings.setValue(
"strDefaultCurrency",
"USD");
1092 settings.setValue(
"fDisplayCurrencyValue",
false);
1099 settings.setValue(
"strDefaultCurrency",
ui->defaultCurrency->currentText());
1107 msgBox.setWindowTitle(
"Password Locked Setting");
1108 msgBox.setIcon(QMessageBox::Information);
1109 msgBox.setText(
"Please unlock the wallet with your passphrase before changing this setting.");
1118 ui->lineEditOldPass->setEchoMode(
ui->showPassphraseCheckBox->checkState() == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);
1119 ui->lineEditNewPass->setEchoMode(
ui->showPassphraseCheckBox->checkState() == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);
1120 ui->lineEditNewPassRepeat->setEchoMode(
ui->showPassphraseCheckBox->checkState() == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);