Fix unlocking error on "Start Mixing" (#1941)

* Fix unlocking error on "Start Mixing"

Instead warn that wallet is fully unlocked etc.

* Revert "Fix unlocking error on "Start Mixing""

This reverts commit 4951e58f66.

* Drop mixingOnlyCheckBox and determine the correct unlock path automatically via provided mode
This commit is contained in:
UdjinM6 2018-02-22 12:00:50 +03:00 committed by GitHub
parent 0153c4c5e8
commit ef9a9f2d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 19 deletions

View File

@ -50,8 +50,13 @@ AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent) :
setWindowTitle(tr("Encrypt wallet")); setWindowTitle(tr("Encrypt wallet"));
break; break;
case UnlockMixing: case UnlockMixing:
ui->mixingOnlyCheckBox->show(); ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet."));
ui->mixingOnlyCheckBox->setChecked(true); ui->passLabel2->hide();
ui->passEdit2->hide();
ui->passLabel3->hide();
ui->passEdit3->hide();
setWindowTitle(tr("Unlock wallet for mixing only"));
break;
case Unlock: // Ask passphrase case Unlock: // Ask passphrase
ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet.")); ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet."));
ui->passLabel2->hide(); ui->passLabel2->hide();
@ -157,7 +162,7 @@ void AskPassphraseDialog::accept()
} break; } break;
case UnlockMixing: case UnlockMixing:
case Unlock: case Unlock:
if(!model->setWalletLocked(false, oldpass, ui->mixingOnlyCheckBox->isChecked())) if(!model->setWalletLocked(false, oldpass, mode == UnlockMixing))
{ {
QMessageBox::critical(this, tr("Wallet unlock failed"), QMessageBox::critical(this, tr("Wallet unlock failed"),
tr("The passphrase entered for the wallet decryption was incorrect.")); tr("The passphrase entered for the wallet decryption was incorrect."));

View File

@ -108,22 +108,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QCheckBox" name="mixingOnlyCheckBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</string>
</property>
<property name="text">
<string>Only for mixing via PrivateSend</string>
</property>
<property name="visible">
<bool>false</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>