fix(@desktop/onboarding): `Onboarding -> Generate keys for a new keycard` - display name is not set
Fixes: #8671
This commit is contained in:
parent
b510b33730
commit
7bae51335b
|
@ -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)
|
||||
|
|
|
@ -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] =
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue