mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-20 10:38:47 +00:00
fix(@desktop/wallet): derivation path is not pre-selected by default when importing account in wallet
Closes: #10153
This commit is contained in:
parent
894cb9eff3
commit
a2f5d81f7f
@ -429,9 +429,11 @@ method changePrivateKey*[T](self: Module[T], privateKey: string) =
|
|||||||
self.controller.fetchDetailsForAddresses(@[genAccDto.address])
|
self.controller.fetchDetailsForAddresses(@[genAccDto.address])
|
||||||
|
|
||||||
method changeSeedPhrase*[T](self: Module[T], seedPhrase: string) =
|
method changeSeedPhrase*[T](self: Module[T], seedPhrase: string) =
|
||||||
let genAccDto = self.controller.createAccountFromSeedPhrase(seedPhrase)
|
|
||||||
self.view.setSelectedDerivedAddress(newDerivedAddressItem())
|
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"
|
error "unable to create an account from the provided seed phrase"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -208,16 +208,17 @@ QtObject {
|
|||||||
root.addAccountModule.selectedEmoji !== ""
|
root.addAccountModule.selectedEmoji !== ""
|
||||||
|
|
||||||
if (root.currentState.stateType === Constants.addAccountPopup.state.main) {
|
if (root.currentState.stateType === Constants.addAccountPopup.state.main) {
|
||||||
if(derivationPathEditingNotValid)
|
if(root.derivationPathEditingNotValid)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
if (root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.profile ||
|
if (root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.profile ||
|
||||||
root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.seedImport) {
|
root.selectedOrigin.pairType === Constants.addAccountPopup.keyPairType.seedImport) {
|
||||||
return valid &&
|
return valid &&
|
||||||
|
(!root.addAccountModule.actionAuthenticated ||
|
||||||
!!root.selectedDerivedAddress &&
|
!!root.selectedDerivedAddress &&
|
||||||
root.selectedDerivedAddress.loaded &&
|
root.selectedDerivedAddress.loaded &&
|
||||||
!root.selectedDerivedAddress.alreadyCreated &&
|
!root.selectedDerivedAddress.alreadyCreated &&
|
||||||
root.selectedDerivedAddress.address !== "" &&
|
root.selectedDerivedAddress.address !== "") &&
|
||||||
root.derivationPathRegEx.test(root.addAccountModule.derivationPath) &&
|
root.derivationPathRegEx.test(root.addAccountModule.derivationPath) &&
|
||||||
(!root.derivationPathOutOfTheDefaultStatusDerivationTree ||
|
(!root.derivationPathOutOfTheDefaultStatusDerivationTree ||
|
||||||
root.derivationPathOutOfTheDefaultStatusDerivationTreeConfirmed)
|
root.derivationPathOutOfTheDefaultStatusDerivationTreeConfirmed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user