fix(@desktop/wallet): derivation path edit control breaks in custom mode

Closes: #10479
This commit is contained in:
Sale Djenic 2023-05-03 13:18:50 +02:00 committed by saledjenic
parent 6a0a7770b2
commit 3588e2a44a
3 changed files with 8 additions and 19 deletions

View File

@ -61,9 +61,6 @@ GridLayout {
Layout.fillWidth: true
enabled: root.store.derivedAddressModel.count > 0
initialDerivationPath: root.store.addAccountModule.derivationPath
initialBasePath: root.store.selectedRootPath
levelsLimit: 4 // Allow only 5 separators in the derivation path
onDerivationPathChanged: {
@ -104,13 +101,11 @@ GridLayout {
onSelected: {
root.store.changeRootDerivationPath(rootPath)
}
derivationPathInput.resetDerivationPath(root.store.selectedRootPath, root.store.addAccountModule.derivationPath)
}
}
Connections {
target: root.store
function onSelectedRootPathChanged() {
Component.onCompleted: {
derivationPathInput.resetDerivationPath(root.store.selectedRootPath, root.store.addAccountModule.derivationPath)
}
}

View File

@ -18,9 +18,6 @@ Item {
readonly property alias derivationPath: d.currentDerivationPath
readonly property alias basePath: d.currentBasePath
required property string initialDerivationPath
required property string initialBasePath
property alias levelsLimit: controller.levelsLimit
property alias errorMessage: d.errorMessage
@ -86,10 +83,6 @@ Item {
}
}
Component.onCompleted: {
resetDerivationPath(root.initialBasePath, root.initialDerivationPath)
}
Internals.Controller {
id: controller

View File

@ -104,12 +104,13 @@ Column {
store: root.store
}
DerivationPathDisplay {
visible: root.store.editMode
Loader {
active: root.store.editMode
sourceComponent: DerivationPathDisplay {
width: parent.width - 2 * root.padding
store: root.store
}
}
states: [
State {