fix(@desktop/community): appropriate password form used when signing join community request in case the profile is migrated to a keycard

This commit is contained in:
Sale Djenic 2023-12-20 14:00:00 +01:00 committed by saledjenic
parent 0536ce898d
commit a055ad4d71
1 changed files with 4 additions and 1 deletions

View File

@ -664,11 +664,14 @@ proc signRevealedAddressesThatBelongToRegularKeypairs(self: Module): bool =
return false return false
if keypair.migratedToKeycard(): if keypair.migratedToKeycard():
continue continue
var finalPassword = self.joiningCommunityDetails.profilePassword
if not singletonInstance.userProfile.getIsKeycardUser():
finalPassword = common_utils.hashPassword(self.joiningCommunityDetails.profilePassword)
signingParams.add( signingParams.add(
SignParamsDto( SignParamsDto(
address: address, address: address,
data: details.messageToBeSigned, data: details.messageToBeSigned,
password: common_utils.hashPassword(self.joiningCommunityDetails.profilePassword), password: finalPassword,
) )
) )
if signingParams.len == 0: if signingParams.len == 0: