From 1ef9a5c2d7103e498b31ae89a7984562cbe71ff3 Mon Sep 17 00:00:00 2001 From: selsta Date: Fri, 3 Sep 2021 22:41:17 +0200 Subject: [PATCH] Transfer: print success / error for key images --- pages/Transfer.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/Transfer.qml b/pages/Transfer.qml index af0a12c7..22141cb8 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -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");