From 0a8f8d702655c7c65ae273ac05503a3e5812b504 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 30 Sep 2024 11:14:41 -0400 Subject: [PATCH] fix(minting): fix minting tokens on Windows (#16422) Fixes #16326 Passes the image through the image formatting function before sending --- src/app/modules/main/communities/tokens/module.nim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/modules/main/communities/tokens/module.nim b/src/app/modules/main/communities/tokens/module.nim index f005a01b5b..aa23dc1cdf 100644 --- a/src/app/modules/main/communities/tokens/module.nim +++ b/src/app/modules/main/communities/tokens/module.nim @@ -184,7 +184,11 @@ method deployCollectibles*(self: Module, communityId: string, fromAddress: strin self.tempDeploymentParams.masterTokenAddress = masterTokenAddress self.tempDeploymentParams.tokenType = TokenType.ERC721 self.tempDeploymentParams.description = description - self.tempDeploymentParams.croppedImageJson = imageCropInfoJson + + let croppedImage = imageCropInfoJson.parseJson + let base65Image = singletonInstance.utils.formatImagePath(croppedImage["imagePath"].getStr) + self.tempDeploymentParams.base64image = base65Image + self.tempDeploymentParams.communityId = communityId self.tempContractAction = ContractAction.Deploy self.authenticate() @@ -241,7 +245,11 @@ method deployAssets*(self: Module, communityId: string, fromAddress: string, nam self.tempDeploymentParams.masterTokenAddress = masterTokenAddress self.tempDeploymentParams.tokenType = TokenType.ERC20 self.tempDeploymentParams.description = description - self.tempDeploymentParams.croppedImageJson = imageCropInfoJson + + let croppedImage = imageCropInfoJson.parseJson + let base65Image = singletonInstance.utils.formatImagePath(croppedImage["imagePath"].getStr) + self.tempDeploymentParams.base64image = base65Image + self.tempDeploymentParams.communityId = communityId self.tempContractAction = ContractAction.Deploy self.authenticate()