diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 0f7376476a..6efd9be632 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -345,6 +345,7 @@ proc setupAccount*(self: Service, accountId, password, displayName: string): str try: let installationId = $genUUID() var accountDataJson = self.getAccountDataForAccountId(accountId, displayName) + self.setKeyStoreDir(accountDataJson{"key-uid"}.getStr) # must be called before `getDefaultNodeConfig` let subaccountDataJson = self.getSubaccountDataForAccountId(accountId, displayName) var settingsJson = self.getAccountSettings(accountId, installationId, displayName) let nodeConfigJson = self.getDefaultNodeConfig(installationId) @@ -355,7 +356,6 @@ proc setupAccount*(self: Service, accountId, password, displayName: string): str error "error: ", procName="setupAccount", errDesription = description return description - self.setKeyStoreDir(accountDataJson{"key-uid"}.getStr) let hashedPassword = hashString(password) discard self.storeAccount(accountId, hashedPassword) discard self.storeDerivedAccounts(accountId, hashedPassword, PATHS) diff --git a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml index 86b8bd8bc1..e6084d9315 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddAccountModal.qml @@ -96,10 +96,10 @@ StatusModal { && !!advancedSelection.expandableItem.mnemonicText) { RootStore.getDerivedAddressListForMnemonic(advancedSelection.expandableItem.mnemonicText, advancedSelection.expandableItem.path, numOfItems, pageNumber) - } else if(!!advancedSelection.expandableItem.path && !!advancedSelection.expandableItem.derivedFromAddress + } else if(!!d.selectedPath && !!d.selectedAccountDerivedFromAddress && (d.password.length > 0)) { - RootStore.getDerivedAddressList(d.password, advancedSelection.expandableItem.derivedFromAddress, - advancedSelection.expandableItem.path, numOfItems, pageNumber) + RootStore.getDerivedAddressList(d.password, d.selectedAccountDerivedFromAddress, + d.selectedPath, numOfItems, pageNumber) } }