fix(@desktop/community): Convert community token image to base64 format

Fix #9866
This commit is contained in:
Michal Iskierko 2023-03-14 13:23:22 +01:00 committed by Michał Iskierko
parent 0bb28f564d
commit 50f64919be
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ method deployCollectible*(self: Module, communityId: string, fromAddress: string
self.tempDeploymentParams.infiniteSupply = infiniteSupply
self.tempDeploymentParams.transferable = transferable
self.tempDeploymentParams.remoteSelfDestruct = selfDestruct
self.tempTokenMetadata.image = image
self.tempTokenMetadata.image = singletonInstance.utils.formatImagePath(image)
self.tempTokenMetadata.description = description
if singletonInstance.userProfile.getIsKeycardUser():
let keyUid = singletonInstance.userProfile.getKeyUid()

View File

@ -108,7 +108,8 @@ QtObject:
communityToken.image = tokenMetadata.image
# save token to db
discard tokens_backend.addCommunityToken(communityToken)
let communityTokenJson = tokens_backend.addCommunityToken(communityToken)
communityToken = communityTokenJson.result.toCommunityTokenDto()
let data = CommunityTokenDeployedArgs(communityToken: communityToken)
self.events.emit(SIGNAL_COMMUNITY_TOKEN_DEPLOYED, data)