mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
fix(@desktop/communities): Fix minting crash when community name length is <3 chars
Fix #11906
This commit is contained in:
parent
1c50ec17a8
commit
a6d7ec2536
@ -185,8 +185,9 @@ method deployOwnerToken*(self: Module, communityId: string, fromAddress: string,
|
||||
self.tempChainId = chainId
|
||||
let communityDto = self.controller.getCommunityById(communityId)
|
||||
let commName = communityDto.name
|
||||
self.tempOwnerDeploymentParams = DeploymentParameters(name: "Owner-" & commName, symbol: "OWN" & commName[0 .. 2].toUpper, supply: stint.u256("1"), infiniteSupply: false, transferable: true, remoteSelfDestruct: false, tokenUri: utl.changeCommunityKeyCompression(communityId) & "/")
|
||||
self.tempMasterDeploymentParams = DeploymentParameters(name: "TMaster-" & commName, symbol: "TM" & commName[0 .. 2].toUpper, infiniteSupply: true, transferable: false, remoteSelfDestruct: true, tokenUri: utl.changeCommunityKeyCompression(communityId) & "/")
|
||||
let commNameShort = try: commName[0 .. 2].toUpper except: commName.toUpper
|
||||
self.tempOwnerDeploymentParams = DeploymentParameters(name: "Owner-" & commName, symbol: "OWN" & commNameShort, supply: stint.u256("1"), infiniteSupply: false, transferable: true, remoteSelfDestruct: false, tokenUri: utl.changeCommunityKeyCompression(communityId) & "/")
|
||||
self.tempMasterDeploymentParams = DeploymentParameters(name: "TMaster-" & commName, symbol: "TM" & commNameShort, infiniteSupply: true, transferable: false, remoteSelfDestruct: true, tokenUri: utl.changeCommunityKeyCompression(communityId) & "/")
|
||||
self.tempOwnerTokenMetadata.description = ownerDescription
|
||||
self.tempOwnerTokenMetadata.tokenType = TokenType.ERC721
|
||||
self.tempMasterTokenMetadata.description = masterDescription
|
||||
|
Loading…
x
Reference in New Issue
Block a user