fix(@desktop/community tokens) fix showing burn icon after restart
Fix #4947
This commit is contained in:
parent
55b2a83c6f
commit
d2bd0109ec
|
@ -345,14 +345,9 @@ proc getCommunityTokensDetailsTaskArg(argEncoded: string) {.gcsafe, nimcall.} =
|
||||||
let allPendingTransactions = getPendingTransactions()
|
let allPendingTransactions = getPendingTransactions()
|
||||||
|
|
||||||
let burnTransactions = allPendingTransactions.filter(x => x.typeValue == $PendingTransactionTypeDto.BurnCommunityToken)
|
let burnTransactions = allPendingTransactions.filter(x => x.typeValue == $PendingTransactionTypeDto.BurnCommunityToken)
|
||||||
|
|
||||||
for transaction in burnTransactions:
|
for transaction in burnTransactions:
|
||||||
try:
|
if transaction.chainId == chainId and transaction.to.toLower == contractAddress.toLower:
|
||||||
let communityToken = toCommunityTokenDto(parseJson(transaction.additionalData))
|
return ContractTransactionStatus.InProgress
|
||||||
if communityToken.chainId == chainId and communityToken.address == contractAddress:
|
|
||||||
return ContractTransactionStatus.InProgress
|
|
||||||
except Exception:
|
|
||||||
discard
|
|
||||||
return ContractTransactionStatus.Completed
|
return ContractTransactionStatus.Completed
|
||||||
|
|
||||||
proc getRemoteDestructedAddresses(chainId: int, contractAddress: string): seq[string] =
|
proc getRemoteDestructedAddresses(chainId: int, contractAddress: string): seq[string] =
|
||||||
|
|
|
@ -781,7 +781,7 @@ QtObject:
|
||||||
let burnTransactions = self.transactionService.getPendingTransactionsForType(PendingTransactionTypeDto.BurnCommunityToken)
|
let burnTransactions = self.transactionService.getPendingTransactionsForType(PendingTransactionTypeDto.BurnCommunityToken)
|
||||||
for transaction in burnTransactions:
|
for transaction in burnTransactions:
|
||||||
try:
|
try:
|
||||||
if transaction.chainId == chainId and transaction.to == contractAddress:
|
if transaction.chainId == chainId and transaction.to.toLower == contractAddress.toLower:
|
||||||
return ContractTransactionStatus.InProgress
|
return ContractTransactionStatus.InProgress
|
||||||
except Exception:
|
except Exception:
|
||||||
discard
|
discard
|
||||||
|
|
Loading…
Reference in New Issue