diff --git a/src/app_service/service/community_tokens/service.nim b/src/app_service/service/community_tokens/service.nim index 899922cc33..e2f5e499ed 100644 --- a/src/app_service/service/community_tokens/service.nim +++ b/src/app_service/service/community_tokens/service.nim @@ -379,7 +379,6 @@ QtObject: if response.error != nil: let error = Json.decode($response.error, RpcError) raise newException(RpcException, "error removing community token: " & error.message) - return self.events.emit(SIGNAL_COMMUNITY_TOKEN_REMOVED, CommunityTokenRemovedArgs(communityId: communityId, contractAddress: address, chainId: chainId)) except RpcException as e: diff --git a/ui/app/AppLayouts/Communities/panels/MintTokensSettingsPanel.qml b/ui/app/AppLayouts/Communities/panels/MintTokensSettingsPanel.qml index 17e27cdf74..7c2c634892 100644 --- a/ui/app/AppLayouts/Communities/panels/MintTokensSettingsPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/MintTokensSettingsPanel.qml @@ -497,10 +497,11 @@ StackView { (!tokenViewPage.isPrivilegedTokenItem && !root.isAdminOnly && tokenViewPage.deploymentFailed) onClicked: { - if(tokenViewPage.isPrivilegedTokenItem) + if(tokenViewPage.isPrivilegedTokenItem) { retryPrivilegedToken() - else + } else { retryAssetOrCollectible() + } } } ] diff --git a/ui/imports/shared/stores/CommunityTokensStore.qml b/ui/imports/shared/stores/CommunityTokensStore.qml index f2c1db75bf..c6414d80a9 100644 --- a/ui/imports/shared/stores/CommunityTokensStore.qml +++ b/ui/imports/shared/stores/CommunityTokensStore.qml @@ -26,8 +26,9 @@ QtObject { // Minting tokens: function deployCollectible(communityId, collectibleItem) { - // TODO: Backend will need to check if the collectibleItem has a valid tokenKey, so it means a deployment retry, - // otherwise, it is a new deployment. + if (collectibleItem.key !== "") { + deleteToken(communityId, collectibleItem.key) + } const jsonArtworkFile = Utils.getImageAndCropInfoJson(collectibleItem.artworkSource, collectibleItem.artworkCropRect) communityTokensModuleInst.deployCollectible(communityId, collectibleItem.accountAddress, collectibleItem.name, collectibleItem.symbol, collectibleItem.description, collectibleItem.supply, @@ -37,8 +38,9 @@ QtObject { function deployAsset(communityId, assetItem) { - // TODO: Backend will need to check if the collectibleItem has a valid tokenKey, so it means a deployment retry, - // otherwise, it is a new deployment. + if (assetItem.key !== "") { + deleteToken(communityId, assetItem.key) + } const jsonArtworkFile = Utils.getImageAndCropInfoJson(assetItem.artworkSource, assetItem.artworkCropRect) communityTokensModuleInst.deployAssets(communityId, assetItem.accountAddress, assetItem.name, assetItem.symbol, assetItem.description, assetItem.supply,