mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-19 18:41:29 +00:00
Merge pull request #884
1f1d51d
Show password dialog before making a transfer
This commit is contained in:
commit
34e7eb4e6b
1 changed files with 28 additions and 7 deletions
35
main.qml
35
main.qml
|
@ -912,13 +912,25 @@ ApplicationWindow {
|
|||
id: transactionConfirmationPopup
|
||||
onAccepted: {
|
||||
close();
|
||||
|
||||
// Save transaction to file if view only wallet
|
||||
if(viewOnly) {
|
||||
saveTxDialog.open();
|
||||
return;
|
||||
} else
|
||||
handleTransactionConfirmed()
|
||||
transactionConfirmationPasswordDialog.onAcceptedCallback = function() {
|
||||
if(appWindow.password === transactionConfirmationPasswordDialog.password){
|
||||
// Save transaction to file if view only wallet
|
||||
if(viewOnly) {
|
||||
saveTxDialog.open();
|
||||
} else {
|
||||
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 {
|
||||
id: daemonManagerDialog
|
||||
onRejected: {
|
||||
|
|
Loading…
Reference in a new issue