mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Show password dialog before making a transfer
This commit is contained in:
parent
4c75fe47f9
commit
1f1d51d8e1
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