aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsc <xmrdsc@protonmail.com>2019-03-01 09:09:02 +0100
committerdsc <xmrdsc@protonmail.com>2019-03-01 09:13:36 +0100
commit0d24f642c3e81af8fc61a898c4e69df2bc91fc8b (patch)
tree53a8411c2052b85ee5373af0342d2ca7cf3aa0ee
parent07df0f41bf8d5f735480289854f08f9e19356d39 (diff)
downloadmonzero-gui-0d24f642c3e81af8fc61a898c4e69df2bc91fc8b.tar.gz
monzero-gui-0d24f642c3e81af8fc61a898c4e69df2bc91fc8b.tar.xz
monzero-gui-0d24f642c3e81af8fc61a898c4e69df2bc91fc8b.zip
invalidate wallet name after creation
-rw-r--r--wizard/WizardCreateDevice1.qml6
-rw-r--r--wizard/WizardCreateWallet1.qml6
-rw-r--r--wizard/WizardRestoreWallet1.qml1
-rw-r--r--wizard/WizardWalletInput.qml5
4 files changed, 18 insertions, 0 deletions
diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml
index a9b15303..cebe0183 100644
--- a/wizard/WizardCreateDevice1.qml
+++ b/wizard/WizardCreateDevice1.qml
@@ -184,4 +184,10 @@ Rectangle {
wizardCreateDevice1.update();
console.log()
}
+
+ function onPageCompleted(previousView){
+ if(previousView.viewName == "wizardHome"){
+ walletInput.reset();
+ }
+ }
}
diff --git a/wizard/WizardCreateWallet1.qml b/wizard/WizardCreateWallet1.qml
index 5d484408..69866abd 100644
--- a/wizard/WizardCreateWallet1.qml
+++ b/wizard/WizardCreateWallet1.qml
@@ -144,4 +144,10 @@ Rectangle {
}
}
}
+
+ function onPageCompleted(previousView){
+ if(previousView.viewName == "wizardHome"){
+ walletInput.reset();
+ }
+ }
}
diff --git a/wizard/WizardRestoreWallet1.qml b/wizard/WizardRestoreWallet1.qml
index cff87b4d..95e125fe 100644
--- a/wizard/WizardRestoreWallet1.qml
+++ b/wizard/WizardRestoreWallet1.qml
@@ -305,6 +305,7 @@ Rectangle {
function onPageCompleted(previousView){
if(previousView.viewName == "wizardHome"){
// cleanup
+ walletInput.reset();
seedInput.text = "";
addressLine.text = "";
spendKeyLine.text = "";
diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml
index aba521f7..e8946647 100644
--- a/wizard/WizardWalletInput.qml
+++ b/wizard/WizardWalletInput.qml
@@ -52,6 +52,11 @@ GridLayout {
return false;
}
+ function reset() {
+ walletName.error = !walletName.verify();
+ walletLocation.error = walletLocation.text === "";
+ }
+
MoneroComponents.LineEdit {
id: walletName
Layout.fillWidth: true