From 50f64919be8a3c4f3b33b06cfa1c828a73c30300 Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Tue, 14 Mar 2023 13:23:22 +0100 Subject: [PATCH] fix(@desktop/community): Convert community token image to base64 format Fix #9866 --- src/app/modules/main/communities/tokens/module.nim | 2 +- src/app_service/service/community_tokens/service.nim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/modules/main/communities/tokens/module.nim b/src/app/modules/main/communities/tokens/module.nim index 0e5e2cfe46..e24638978d 100644 --- a/src/app/modules/main/communities/tokens/module.nim +++ b/src/app/modules/main/communities/tokens/module.nim @@ -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() diff --git a/src/app_service/service/community_tokens/service.nim b/src/app_service/service/community_tokens/service.nim index eb9ea2297e..b6c69d047c 100644 --- a/src/app_service/service/community_tokens/service.nim +++ b/src/app_service/service/community_tokens/service.nim @@ -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)