Skip to content

Commit

Permalink
update price env with svelte import
Browse files Browse the repository at this point in the history
  • Loading branch information
joeetwork committed Dec 8, 2023
1 parent 6ed698f commit 932c439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/trpc/routes/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import { z } from "zod";

import { t } from "$lib/trpc/t";

import { BIRDEYE_API_KEY } from "$env/static/private";

export const price = t.procedure
.input(z.string())
.query(async ({ input: token }) => {
const apiKey = import.meta.env.BIRDEYE_API_KEY;
const response = await fetch(
`https://public-api.birdeye.so/public/price/?address=${token}`,
{
headers: {
Accept: "application/json",
"X-API-KEY": apiKey,
"X-API-KEY": BIRDEYE_API_KEY,
"x-chain": "solana",
},
}
Expand Down

0 comments on commit 932c439

Please sign in to comment.