diff --git a/Components/sigseries.js b/Components/sigseries.js index 54df18b..90730da 100644 --- a/Components/sigseries.js +++ b/Components/sigseries.js @@ -11,7 +11,7 @@ import BuyAsset from "./buyAssetModal"; import { sellItem } from "../pages/api/sellItem"; import Web3Modal from "web3modal"; import { useAccount } from "wagmi"; -import { useData } from "../../context/data"; +import { useData } from "../context/data"; // const apiUrl = // "https://testnet.gateway.myriadflow.com/api/v1.0/webapp/contracts/7aa9e5d1-a31f-4962-88f4-3d970c609844"; diff --git a/pages/api/auctionbuy.js b/pages/api/auctionbuy.js index 90c4d86..3e4f634 100644 --- a/pages/api/auctionbuy.js +++ b/pages/api/auctionbuy.js @@ -1,25 +1,10 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { walletAddress } = req.query; - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/eternumcreated.js b/pages/api/eternumcreated.js index b3a51a5..099b8c4 100644 --- a/pages/api/eternumcreated.js +++ b/pages/api/eternumcreated.js @@ -1,24 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/fusioncreated.js b/pages/api/fusioncreated.js index 502b728..0a9b7fc 100644 --- a/pages/api/fusioncreated.js +++ b/pages/api/fusioncreated.js @@ -1,24 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/instagencreated.js b/pages/api/instagencreated.js index 045f0c3..3aa8206 100644 --- a/pages/api/instagencreated.js +++ b/pages/api/instagencreated.js @@ -1,24 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/onefusion.js b/pages/api/onefusion.js index 29efe11..ad6d04a 100644 --- a/pages/api/onefusion.js +++ b/pages/api/onefusion.js @@ -1,26 +1,11 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { nftid } = req.query; - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/oneinstagen.js b/pages/api/oneinstagen.js index fddf23b..68dd1ab 100644 --- a/pages/api/oneinstagen.js +++ b/pages/api/oneinstagen.js @@ -1,26 +1,11 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { nftid } = req.query; - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/onesaleasset.js b/pages/api/onesaleasset.js index 05da5d5..eab166a 100644 --- a/pages/api/onesaleasset.js +++ b/pages/api/onesaleasset.js @@ -1,26 +1,11 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { tokenid } = req.query; const { subgraphUrl } = req.query; - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/onesigseries.js b/pages/api/onesigseries.js index 6f16860..8b5e619 100644 --- a/pages/api/onesigseries.js +++ b/pages/api/onesigseries.js @@ -1,25 +1,10 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { nftid } = req.query; - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/salegraph.js b/pages/api/salegraph.js index 85ba17f..ac9e4c4 100644 --- a/pages/api/salegraph.js +++ b/pages/api/salegraph.js @@ -1,25 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; - + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/selfsalegraph.js b/pages/api/selfsalegraph.js index 3940173..a318754 100644 --- a/pages/api/selfsalegraph.js +++ b/pages/api/selfsalegraph.js @@ -1,24 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/sigseriescreated.js b/pages/api/sigseriescreated.js index b3a51a5..099b8c4 100644 --- a/pages/api/sigseriescreated.js +++ b/pages/api/sigseriescreated.js @@ -1,24 +1,8 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { - - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", }; diff --git a/pages/api/soldgraph.js b/pages/api/soldgraph.js index 135fcf6..43714fe 100644 --- a/pages/api/soldgraph.js +++ b/pages/api/soldgraph.js @@ -1,25 +1,10 @@ // pages/api/graphql.js import axios from "axios"; -import { useData } from "../../context/data"; export default async function handler(req, res) { const { walletAddress } = req.query; - const { resdata } = useData(); - - const graphql = resdata?.Storefront.subgraphUrl; - console.log(graphql); - - const regex = /^(.*?)(?=\/graphql)/; - - // Use the regular expression to extract the URL - const match = graphql?.match(regex); - - // Extract the matched URL or set it to null if no match was found - const graphqlAPI = match ? match[0] : null; - console.log(graphqlAPI); - - const endPoint = graphqlAPI; + const endPoint = "http://3.15.54.199:8000/subgraphs/name/fnl"; const headers = { "Content-Type": "application/json", };