diff --git a/src/app/boot/app_controller.nim b/src/app/boot/app_controller.nim index 3341da520f..83ae74361a 100644 --- a/src/app/boot/app_controller.nim +++ b/src/app/boot/app_controller.nim @@ -396,11 +396,6 @@ proc buildAndRegisterUserProfile(self: AppController) = elif(img.imgType == "thumbnail"): thumbnail = img.uri - # loggedInAccount.name and displayName must be the same, if not, we are using loggedInAccount.name - if (loggedInAccount.name != displayName): - info "login account name and display name stored in settings differ" - displayName = loggedInAccount.name - singletonInstance.userProfile.setFixedData(alias, loggedInAccount.keyUid, pubKey, loggedInAccount.keycardPairing.len > 0) singletonInstance.userProfile.setDisplayName(displayName) singletonInstance.userProfile.setPreferredName(preferredName) diff --git a/src/app/modules/startup/controller.nim b/src/app/modules/startup/controller.nim index 81afa52083..fb291783b7 100644 --- a/src/app/modules/startup/controller.nim +++ b/src/app/modules/startup/controller.nim @@ -329,7 +329,7 @@ proc storeKeycardAccountAndLogin*(self: Controller, storeToKeychain: bool) = self.delegate.moveToLoadingAppState() self.delegate.storeKeyPairForNewKeycardUser() self.storeMetadataForNewKeycardUser() - self.accountsService.setupAccountKeycard(KeycardEvent(), useImportedAcc = true) + self.accountsService.setupAccountKeycard(KeycardEvent(), self.tmpDisplayName, useImportedAcc = true) self.setupKeychain(storeToKeychain) else: error "an error ocurred while importing mnemonic" @@ -341,7 +341,7 @@ proc setupKeycardAccount*(self: Controller, storeToKeychain: bool) = else: self.delegate.moveToLoadingAppState() self.delegate.storeKeyPairForNewKeycardUser() - self.accountsService.setupAccountKeycard(self.tmpKeycardEvent, useImportedAcc = false) + self.accountsService.setupAccountKeycard(self.tmpKeycardEvent, self.tmpDisplayName, useImportedAcc = false) self.setupKeychain(storeToKeychain) proc getOpenedAccounts*(self: Controller): seq[AccountDto] = diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index e6c21f1db2..550cfa8171 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -379,7 +379,7 @@ QtObject: error "error: ", procName="setupAccount", errName = e.name, errDesription = e.msg return e.msg - proc setupAccountKeycard*(self: Service, keycardData: KeycardEvent, useImportedAcc: bool) = + proc setupAccountKeycard*(self: Service, keycardData: KeycardEvent, displayName: string, useImportedAcc: bool) = try: var keyUid = keycardData.keyUid var address = keycardData.masterKey.address @@ -409,15 +409,6 @@ QtObject: let installationId = $genUUID() let alias = generateAliasFromPk(whisperPublicKey) - let openedAccounts = self.openedAccounts() - var displayName: string - for acc in openedAccounts: - if acc.keyUid == keyUid: - displayName = acc.name - break - if displayName.len == 0: - displayName = self.getLoggedInAccount().name - var accountDataJson = %* { "name": alias, "display-name": displayName, @@ -453,7 +444,7 @@ QtObject: "key-uid": keyUid, "public-key": whisperPublicKey, "name": alias, - "display-name": "", + "display-name": displayName, "address": whisperAddress, "eip1581-address": eip1581Address, "dapps-address": walletAddress,