fix(@desktop/community tokens) fix showing burn icon after restart

Fix #4947
This commit is contained in:
Michal Iskierko 2024-07-02 14:16:52 +02:00 committed by Michał Iskierko
parent 55b2a83c6f
commit d2bd0109ec
2 changed files with 3 additions and 8 deletions

View File

@ -345,14 +345,9 @@ proc getCommunityTokensDetailsTaskArg(argEncoded: string) {.gcsafe, nimcall.} =
let allPendingTransactions = getPendingTransactions()
let burnTransactions = allPendingTransactions.filter(x => x.typeValue == $PendingTransactionTypeDto.BurnCommunityToken)
for transaction in burnTransactions:
try:
let communityToken = toCommunityTokenDto(parseJson(transaction.additionalData))
if communityToken.chainId == chainId and communityToken.address == contractAddress:
return ContractTransactionStatus.InProgress
except Exception:
discard
if transaction.chainId == chainId and transaction.to.toLower == contractAddress.toLower:
return ContractTransactionStatus.InProgress
return ContractTransactionStatus.Completed
proc getRemoteDestructedAddresses(chainId: int, contractAddress: string): seq[string] =

View File

@ -781,7 +781,7 @@ QtObject:
let burnTransactions = self.transactionService.getPendingTransactionsForType(PendingTransactionTypeDto.BurnCommunityToken)
for transaction in burnTransactions:
try:
if transaction.chainId == chainId and transaction.to == contractAddress:
if transaction.chainId == chainId and transaction.to.toLower == contractAddress.toLower:
return ContractTransactionStatus.InProgress
except Exception:
discard