From 8d4a2ec9832d07eb98ebab58d26d971b160c6506 Mon Sep 17 00:00:00 2001 From: Andrey Bocharnikov Date: Tue, 6 Aug 2024 01:20:04 +0700 Subject: [PATCH] fix(community): Owner token / Token Master token not visible in community settings (#15983) Fixes #15830 followup task #15981 - reload tokens when app goes back online --- .../service/community_tokens/async_tasks.nim | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/app_service/service/community_tokens/async_tasks.nim b/src/app_service/service/community_tokens/async_tasks.nim index ec2ee1bcd6..b86cb2c61b 100644 --- a/src/app_service/service/community_tokens/async_tasks.nim +++ b/src/app_service/service/community_tokens/async_tasks.nim @@ -378,16 +378,19 @@ proc getCommunityTokensDetailsTaskArg(argEncoded: string) {.gcsafe, nimcall.} = var destructedAmount = "0" if tokenDto.deployState == DeployState.Deployed: - remainingSupply = - if tokenDto.infiniteSupply: - "0" - else: - getRemainingSupply(tokenDto.chainId, tokenDto.address) + try: + remainingSupply = + if tokenDto.infiniteSupply: + "0" + else: + getRemainingSupply(tokenDto.chainId, tokenDto.address) - burnState = getCommunityTokenBurnState(tokenDto.chainId, tokenDto.address) - remoteDestructedAddresses = getRemoteDestructedAddresses(tokenDto.chainId, tokenDto.address) + burnState = getCommunityTokenBurnState(tokenDto.chainId, tokenDto.address) + remoteDestructedAddresses = getRemoteDestructedAddresses(tokenDto.chainId, tokenDto.address) - destructedAmount = getRemoteDestructedAmount(communityTokens, tokenDto.chainId, tokenDto.address) + destructedAmount = getRemoteDestructedAmount(communityTokens, tokenDto.chainId, tokenDto.address) + except Exception as e: + error "Remote token state retrieval error", message = getCurrentExceptionMsg() return %* { "address": tokenDto.address,