Merge pull request #884

1f1d51d Show password dialog before making a transfer
This commit is contained in:
luigi1111 2017-10-23 13:59:58 -05:00
commit 34e7eb4e6b
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -912,14 +912,26 @@ ApplicationWindow {
id: transactionConfirmationPopup id: transactionConfirmationPopup
onAccepted: { onAccepted: {
close(); close();
transactionConfirmationPasswordDialog.onAcceptedCallback = function() {
if(appWindow.password === transactionConfirmationPasswordDialog.password){
// Save transaction to file if view only wallet // Save transaction to file if view only wallet
if(viewOnly) { if(viewOnly) {
saveTxDialog.open(); saveTxDialog.open();
return; } else {
} else
handleTransactionConfirmed() handleTransactionConfirmed()
} }
} else {
informationPopup.title = qsTr("Error") + translationManager.emptyString;
informationPopup.text = qsTr("Wrong password");
informationPopup.open()
informationPopup.onCloseCallback = function() {
transactionConfirmationPasswordDialog.open()
}
}
transactionConfirmationPasswordDialog.password = ""
}
transactionConfirmationPasswordDialog.open()
}
} }
StandardDialog { StandardDialog {
@ -968,6 +980,15 @@ ApplicationWindow {
} }
PasswordDialog {
id: transactionConfirmationPasswordDialog
property var onAcceptedCallback
onAccepted: {
if (onAcceptedCallback())
onAcceptedCallback();
}
}
DaemonManagerDialog { DaemonManagerDialog {
id: daemonManagerDialog id: daemonManagerDialog
onRejected: { onRejected: {