mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-27 06:46:22 +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])
|
||||
|
||||
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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user