Skip to content

Commit

Permalink
Merge pull request #153 from NetSepio/main
Browse files Browse the repository at this point in the history
Merging main with prod
  • Loading branch information
Rushikeshnimkar authored Oct 14, 2024
2 parents 7b979b6 + 6e61d5b commit 64af85e
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 238 deletions.
1 change: 1 addition & 0 deletions components/Login/aptos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const useAptosWallet = () => {
flowId: nonce,
signature: `${signaturewallet}`,
pubKey: publicKey,
chainName : "aptos"
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate?chain=${chainsym}`;
Expand Down
1 change: 1 addition & 0 deletions components/Login/ethereum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
const authenticationData = {
flowId: nonce,
signature: data,
chainName : "manta"
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate?chain=${chainsym}`;
Expand Down
1 change: 1 addition & 0 deletions components/Login/peaq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const usePeaqWallet = () => {
const authenticationData = {
flowId: nonce,
signature: data,
chainName : "peaq"
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate?chain=evm`;
Expand Down
1 change: 1 addition & 0 deletions components/Login/solana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const useSolWallet = (setshowsignbutton) => {
pubKey: publicKey,
walletAddress: publicKey,
message: message,
chainName : "solana"
};

const authenticateApiUrl = `${REACT_APP_GATEWAY_URL}api/v1.0/authenticate?walletAddress=${publicKey}&chain=sol`;
Expand Down
1 change: 1 addition & 0 deletions components/Login/suiwallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const erebrusWallet =getwallet();
const authenticationData = {
flowId: nonce,
signatureSui:result.signature,
chainName : "sui"


};
Expand Down
23 changes: 19 additions & 4 deletions components/UserNFTs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Connection, PublicKey } from '@solana/web3.js';
import { Metaplex } from '@metaplex-foundation/js';

const COLLECTION_IDS = {
DL_NFT: '5FusHaKEKjfKsmQwXNrhFcFABGGxu7iYCdbvyVSRe3Ri',
SOLANA_MONKEY_BUSINESS_GEN2: 'SMBtHCCC6RYRutFEPb4gZqeBLUZbMNhRKaMKZZLHi7W',
SOLANA_MONKEY_BUSINESS_GEN3: '8Rt3Ayqth4DAiPnW9MDFi63TiQJHmohfTWLMQFHi4KZH',
SHARKX: '5f2PvbmKd9pRLjKdMr8nrK8fNisLi7irjB6X5gopnKpB',
Superteam_Member_NFT :'5sDBuHZ7zDzZ2Px1YQS3ELxoFja5J66vpKKcW84ndRk7'
};

const fetchUserNFTs = async (userAddress: string, chainSymbol: string) => {
if (!userAddress) {
console.log('No user address provided');
Expand Down Expand Up @@ -29,7 +37,13 @@ const fetchUserNFTs = async (userAddress: string, chainSymbol: string) => {
const userNFTs = await metaplex.nfts().findAllByOwner({ owner: ownerPublicKey });
console.log('All user NFTs:', userNFTs);

const erebrusNFTs = userNFTs.filter(nft => nft.symbol === "EVPN").map(nft => ({
const filteredNFTs = userNFTs.filter(nft =>
nft.collection?.address.toString() === COLLECTION_IDS.DL_NFT ||
nft.collection?.address.toString() === COLLECTION_IDS.SOLANA_MONKEY_BUSINESS_GEN2 ||
nft.collection?.address.toString() === COLLECTION_IDS.SOLANA_MONKEY_BUSINESS_GEN3 ||
nft.collection?.address.toString() === COLLECTION_IDS.SHARKX ||
nft.collection?.address.toString() === COLLECTION_IDS.Superteam_Member_NFT
).map(nft => ({
amount: 1,
current_token_data: {
token_name: nft.name,
Expand All @@ -39,12 +53,13 @@ const fetchUserNFTs = async (userAddress: string, chainSymbol: string) => {
cdn_asset_uris: {
cdn_image_uri: nft.json?.image || '',
},
collection: nft.collection?.address.toString(),
},
}));

console.log('Filtered Erebrus NFTs:', erebrusNFTs);
console.log('Filtered NFTs from specified collections:', filteredNFTs);

return erebrusNFTs;
return filteredNFTs;
} else {
console.log('NFT fetching for this chain not implemented yet');
return [];
Expand All @@ -55,4 +70,4 @@ const fetchUserNFTs = async (userAddress: string, chainSymbol: string) => {
}
};

export default fetchUserNFTs;
export default fetchUserNFTs;
226 changes: 0 additions & 226 deletions pages/dvpnnft.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions pages/nodeinfo/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const NodeDetail: React.FC = () => {
<img src="/ellipse1.png" className="w-20 h-20 md:w-40 md:h-40" />
<div className="absolute inset-0 flex flex-col items-center justify-center text-xs md:text-base">
<div className="text-sm md:text-lg font-semibold">{node.uploadSpeed}</div>
<div className="text-xs md:text-sm">Kbps Speed</div>
<div className="text-xs md:text-sm">Mbps Speed</div>
</div>
</div>
<div className="mt-2 text-xs md:text-base">Upload</div>
Expand All @@ -189,7 +189,7 @@ const NodeDetail: React.FC = () => {
<img src="/ellipse1.png" className="w-20 h-20 md:w-40 md:h-40" />
<div className="absolute inset-0 flex flex-col items-center justify-center text-xs md:text-base">
<div className="text-sm md:text-lg font-semibold">{node.downloadSpeed}</div>
<div className="text-xs md:text-sm">Kbps Speed</div>
<div className="text-xs md:text-sm">Mbps Speed</div>
</div>
</div>
<div className="mt-2 text-xs md:text-base">Download</div>
Expand Down
19 changes: 13 additions & 6 deletions pages/plans.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,19 @@ const Plans = () => {
Start Free Trial
</button>
<button
className="bg-white text-black text-base sm:text-lg border-2 border-white px-4 py-2 rounded-[10px] w-full sm:w-1/2 focus:outline-none"
>
<Link href="/mint">
Mint NFT Now
</Link>
</button>
className={`bg-white text-black text-base sm:text-lg border-2 border-white px-4 py-2 rounded-[10px] w-full sm:w-1/2 focus:outline-none ${
chainSym === 'sol' ? 'opacity-50 cursor-not-allowed' : ''
}`}
disabled={chainSym === 'sol'}
>
{chainSym !== 'sol' ? (
<Link href="/mint">
Mint NFT Now
</Link>
) : (
<span>Mint NFT Now</span>
)}
</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 64af85e

Please sign in to comment.