From 3c09d0e12ea264cfa79a04cbe6050984c06c1f72 Mon Sep 17 00:00:00 2001 From: Rushikeshnimkar Date: Thu, 17 Oct 2024 12:34:46 +0530 Subject: [PATCH] fix : solana nft fetching --- components/UserNFTs.tsx | 4 ++-- package.json | 1 + pnpm-lock.yaml | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/UserNFTs.tsx b/components/UserNFTs.tsx index 6f24000..854c0f3 100644 --- a/components/UserNFTs.tsx +++ b/components/UserNFTs.tsx @@ -5,7 +5,7 @@ import axios from 'axios'; import Cookies from 'js-cookie'; const ALLOWED_COLLECTIONS = { - sol: ['SMB Gen2', 'sharx by sharky.fi', 'Superteam Member NFT', 'Deanslist', 'SMB Gen3', "Erebrus Community NFT #001"], + sol: ['SMB', 'sharx', '$TEAM', 'DEAN', "Erebrus Community NFT #001"], apt: ["Undying City Equipment Collection"] }; @@ -40,7 +40,7 @@ const fetchUserNFTs = async (chainSymbol: string) => { console.log('All user NFTs:', userNFTs); const filteredNFTs = userNFTs.filter(nft => - ALLOWED_COLLECTIONS.sol.includes(nft.name) + ALLOWED_COLLECTIONS.sol.includes(nft.symbol) ).map(nft => ({ amount: 1, current_token_data: { diff --git a/package.json b/package.json index 93cbc75..9cd3f07 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@martianwallet/aptos-wallet-adapter": "^0.0.5", "@metaplex-foundation/js": "^0.20.1", "@metaplex-foundation/mpl-token-metadata": "^3.2.1", + "@metaplex-foundation/umi": "^0.9.2", "@metaplex-foundation/umi-bundle-defaults": "^0.9.2", "@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.2", "@metaplex-foundation/umi-uploader-bundlr": "^0.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 388d7f8..bf991d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: '@metaplex-foundation/mpl-token-metadata': specifier: ^3.2.1 version: 3.2.1(@metaplex-foundation/umi@0.9.2) + '@metaplex-foundation/umi': + specifier: ^0.9.2 + version: 0.9.2 '@metaplex-foundation/umi-bundle-defaults': specifier: ^0.9.2 version: 0.9.2(@metaplex-foundation/umi@0.9.2)(@solana/web3.js@1.95.3(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(encoding@0.1.13)