From f1ee4f45caf0e82ea7b5d1e720433778f9640afa Mon Sep 17 00:00:00 2001 From: Bobo Date: Fri, 3 Jan 2025 08:49:28 +0100 Subject: [PATCH] Account NFT loading fix (#1434) * Account NFT loading fix * Comment out NFT fetching --- src/hooks/useAccount.ts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/hooks/useAccount.ts b/src/hooks/useAccount.ts index 27a6e7ee1..42652c15c 100644 --- a/src/hooks/useAccount.ts +++ b/src/hooks/useAccount.ts @@ -104,26 +104,30 @@ export const useAccount = () => { if (mapped) { const identityRepository = container.get(Symbols.IdentityRepository); - const nftRepository = container.get(Symbols.NftRepository); + // const nftRepository = container.get(Symbols.NftRepository); const identity = await identityRepository.getIdentity(isEvmAddress ? mapped : address); const name = identity?.display || ''; let avatarUrl: string | undefined; let nft: NftMetadata | undefined; - const avatarContractAddress = identity?.getAvatarContractAddress(); - const avatarTokenId = identity?.getAvatarTokenId(); - if (avatarContractAddress && avatarTokenId) { - nft = await nftRepository.getNftMetadata( - currentNetworkName.value.toLowerCase(), - avatarContractAddress, - avatarTokenId - ); - - if (nft) { - avatarUrl = getProxiedUrl(nft.image); - } - } + // const avatarContractAddress = identity?.getAvatarContractAddress(); + // const avatarTokenId = identity?.getAvatarTokenId(); + // if (avatarContractAddress && avatarTokenId) { + // try { + // nft = await nftRepository.getNftMetadata( + // currentNetworkName.value.toLowerCase(), + // avatarContractAddress, + // avatarTokenId + // ); + + // if (nft) { + // avatarUrl = getProxiedUrl(nft.image); + // } + // } catch (error) { + // console.error('Unable to fetch nft metadata', error); + // } + // } const account: UnifiedAccount = { nativeAddress: isEvmAddress ? mapped : address,