From de2c421b5e7e1a88fe08953ac2ab7a68197beb4a Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 5 Oct 2022 14:43:57 +0300 Subject: [PATCH] fix(Wallet): allow to edit name and color for a new account before authentication There is no good reason to keep user entering information before authenticating Also fix typo Fixes: #7714 --- src/app/modules/main/wallet_section/accounts/module.nim | 2 +- src/app/modules/main/wallet_section/accounts/view.nim | 4 ++-- ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/modules/main/wallet_section/accounts/module.nim b/src/app/modules/main/wallet_section/accounts/module.nim index bb20ad30d5..4b73ea361c 100644 --- a/src/app/modules/main/wallet_section/accounts/module.nim +++ b/src/app/modules/main/wallet_section/accounts/module.nim @@ -182,6 +182,6 @@ method authenticateUser*(self: Module) = method onUserAuthenticated*(self: Module, password: string) = if password.len > 0: - self.view.userAuthenticaionSuccess(password) + self.view.userAuthenticationSuccess(password) else: self.view.userAuthentiactionFail() diff --git a/src/app/modules/main/wallet_section/accounts/view.nim b/src/app/modules/main/wallet_section/accounts/view.nim index 620e841f92..3ef577cdb3 100644 --- a/src/app/modules/main/wallet_section/accounts/view.nim +++ b/src/app/modules/main/wallet_section/accounts/view.nim @@ -277,8 +277,8 @@ QtObject: proc validSeedPhrase*(self: View, value: string): bool {.slot.} = return self.delegate.validSeedPhrase(value) - - proc userAuthenticaionSuccess*(self: View, password: string) {.signal.} + + proc userAuthenticationSuccess*(self: View, password: string) {.signal.} proc userAuthentiactionFail*(self: View) {.signal.} proc authenticateUser*(self: View) {.slot.} = diff --git a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml index af8d238627..b45d9b4569 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml @@ -42,7 +42,7 @@ StatusModal { Connections { target: walletSectionAccounts - onUserAuthenticaionSuccess: { + onUserAuthenticationSuccess: { validationError.text = "" d.password = password d.getDerivedAddressList() @@ -189,7 +189,6 @@ StatusModal { input.isIconSelectable: true input.asset.color: colorSelectionGrid.selectedColor ? colorSelectionGrid.selectedColor : Theme.palette.directColor1 input.leftPadding: Style.current.padding - enabled: !d.authenticationNeeded onIconClicked: { root.emojiPopup.open() root.emojiPopup.emojiSize = StatusQUtils.Emoji.size.verySmall @@ -215,7 +214,6 @@ StatusModal { StatusColorSelectorGrid { id: colorSelectionGrid anchors.horizontalCenter: parent.horizontalCenter - enabled: !d.authenticationNeeded titleText: qsTr("color").toUpperCase() }