diff --git a/packages/web-app/app/api/sale/route.ts b/packages/web-app/app/api/sale/route.ts index b3a0e695..959a4c8a 100644 --- a/packages/web-app/app/api/sale/route.ts +++ b/packages/web-app/app/api/sale/route.ts @@ -1,5 +1,4 @@ import { saleDetails } from '@/app/_server/sales'; -import { formatEther, formatUnits } from 'viem'; declare global { interface BigInt { @@ -14,52 +13,13 @@ BigInt.prototype.toJSON = function () { export const dynamic = 'force-static'; export async function GET(_request: Request) { - return Response.json([]); - // const details = await saleDetails(); - // - // if (typeof details === 'object' && 'error' in details) { - // return new Response(`Sales details error: ${details.error}`, { - // status: 500, - // }); - // } - // - // const tempDetails = details.map((project) => { - // return { - // ...project, - // minTarget: formatUnits(project.minTarget, 6), - // maxTarget: formatUnits(project.maxTarget, 6), - // }; - // }); - // - // const host = process.env.NEXT_PUBLIC_DAPP_HOST; - // - // const extendedWithTBA = [ - // ...tempDetails, - // { - // address: 'TBA', - // publicKey: 'TBA', - // project: 'The Posemesh (AUKI)', - // description: - // 'The DePIN for AI Perception. The posemesh is a decentralized machine perception network for the next 100 billion people, devices and AI.', - // status: 'upcoming', - // rate: 'TBA', - // minTarget: 'TBA', - // maxTarget: 'TBA', - // start: 'TBA', - // end: 'TBA', - // minContribution: 'TBA', - // maxContribution: 'TBA', - // totalTokensForSale: 'TBA', - // startRegistration: 'TBA', - // endRegistration: 'TBA', - // url: 'TBA', - // logo: `${host}/auki-logo.png`, - // background: `${host}/auki-card-background.png`, - // backgroundMobile: `${host}/auki-card-background.png`, - // supplyPercentage: 'TBA', - // currentPrice: 'TBA', - // }, - // ]; - // - // return Response.json(extendedWithTBA); + const details = await saleDetails(); + + if (typeof details === 'object' && 'error' in details) { + return new Response(`Sales details error: ${details.error}`, { + status: 500, + }); + } + + return Response.json(details); }