diff --git a/src/app/modules/main/wallet_section/add_account/module.nim b/src/app/modules/main/wallet_section/add_account/module.nim index 4d93108ce1..426c812a3e 100644 --- a/src/app/modules/main/wallet_section/add_account/module.nim +++ b/src/app/modules/main/wallet_section/add_account/module.nim @@ -429,9 +429,11 @@ method changePrivateKey*[T](self: Module[T], privateKey: string) = self.controller.fetchDetailsForAddresses(@[genAccDto.address]) method changeSeedPhrase*[T](self: Module[T], seedPhrase: string) = - let genAccDto = self.controller.createAccountFromSeedPhrase(seedPhrase) self.view.setSelectedDerivedAddress(newDerivedAddressItem()) - if genAccDto.address.len == 0: + if seedPhrase.len == 0: + return + let genAccDto = self.controller.createAccountFromSeedPhrase(seedPhrase) + if seedPhrase.len > 0 and genAccDto.address.len == 0: error "unable to create an account from the provided seed phrase" return diff --git a/ui/app/AppLayouts/Wallet/addaccount/stores/AddAccountStore.qml b/ui/app/AppLayouts/Wallet/addaccount/stores/AddAccountStore.qml index 29fe2715e6..edf2628bf4 100644 --- a/ui/app/AppLayouts/Wallet/addaccount/stores/AddAccountStore.qml +++ b/ui/app/AppLayouts/Wallet/addaccount/stores/AddAccountStore.qml @@ -208,16 +208,17 @@ QtObject { root.addAccountModule.selectedEmoji !== "" if (root.currentState.stateType === Constants.addAccountPopup.state.main) { - if(derivationPathEditingNotValid) + if(root.derivationPathEditingNotValid) return false if (root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.profile || root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.seedImport) { return valid && + (!root.addAccountModule.actionAuthenticated || !!root.selectedDerivedAddress && root.selectedDerivedAddress.loaded && !root.selectedDerivedAddress.alreadyCreated && - root.selectedDerivedAddress.address !== "" && + root.selectedDerivedAddress.address !== "") && root.derivationPathRegEx.test(root.addAccountModule.derivationPath) && (!root.derivationPathOutOfTheDefaultStatusDerivationTree || root.derivationPathOutOfTheDefaultStatusDerivationTreeConfirmed)