1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-22 12:14:00 +01:00

Transfer: print success / error for key images

This commit is contained in:
selsta 2021-09-03 22:41:17 +02:00
parent 3f48e3ef1c
commit 1ef9a5c2d7
No known key found for this signature in database
GPG Key ID: 2EA0A99A8B07AE5E

View File

@ -1140,7 +1140,11 @@ Rectangle {
selectExisting: false
onAccepted: {
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl), true);
if (currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl), true)) {
appWindow.showStatusMessage(qsTr("Key images successfully exported to file") + translationManager.emptyString, 3);
} else {
appWindow.showStatusMessage(currentWallet.errorString, 5);
}
}
onRejected: {
console.log("Canceled");
@ -1155,7 +1159,11 @@ Rectangle {
title: qsTr("Please choose a file") + translationManager.emptyString
onAccepted: {
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl));
if (currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))) {
appWindow.showStatusMessage(qsTr("Key images successfully imported to wallet") + translationManager.emptyString, 3);
} else {
appWindow.showStatusMessage(currentWallet.errorString, 5);
}
}
onRejected: {
console.log("Canceled");