fix(@desktop/wallet): return transaction list even if nft metadata fetch fails

Fixes #11054
This commit is contained in:
Dario Gabriel Lipicar 2023-06-13 09:36:32 -03:00 committed by dlipicar
parent 2cb2f8354d
commit be6fe0633e
1 changed files with 6 additions and 4 deletions

View File

@ -53,10 +53,12 @@ const loadTransactionsTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall.}
let collectiblesResponse = collectibles.getOpenseaAssetsByNFTUniqueID(arg.chainId, uniqueIds, arg.collectiblesLimit) let collectiblesResponse = collectibles.getOpenseaAssetsByNFTUniqueID(arg.chainId, uniqueIds, arg.collectiblesLimit)
if not collectiblesResponse.error.isNil: if not collectiblesResponse.error.isNil:
raise newException(ValueError, "Error getOpenseaAssetsByNFTUniqueID" & collectiblesResponse.error.message) # We don't want to prevent getting the list of transactions if we cannot get
# NFT metadata. Just don't return the metadata.
output["collectibles"] = collectiblesResponse.result let errDesription = "Error getOpenseaAssetsByNFTUniqueID" & collectiblesResponse.error.message
error "error loadTransactionsTask: ", errDesription
else:
output["collectibles"] = collectiblesResponse.result
except Exception as e: except Exception as e:
let errDesription = e.msg let errDesription = e.msg
error "error loadTransactionsTask: ", errDesription error "error loadTransactionsTask: ", errDesription