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,13 +912,25 @@ ApplicationWindow {
id: transactionConfirmationPopup id: transactionConfirmationPopup
onAccepted: { onAccepted: {
close(); close();
transactionConfirmationPasswordDialog.onAcceptedCallback = function() {
// Save transaction to file if view only wallet if(appWindow.password === transactionConfirmationPasswordDialog.password){
if(viewOnly) { // Save transaction to file if view only wallet
saveTxDialog.open(); if(viewOnly) {
return; saveTxDialog.open();
} 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()
} }
} }
@ -968,6 +980,15 @@ ApplicationWindow {
} }
PasswordDialog {
id: transactionConfirmationPasswordDialog
property var onAcceptedCallback
onAccepted: {
if (onAcceptedCallback())
onAcceptedCallback();
}
}
DaemonManagerDialog { DaemonManagerDialog {
id: daemonManagerDialog id: daemonManagerDialog
onRejected: { onRejected: {