diff --git a/apps/staking/src/app/api/v1/locked_accounts/route.ts b/apps/staking/src/app/api/v1/locked_accounts/route.ts index 47f2ad9949..95887e7fe0 100644 --- a/apps/staking/src/app/api/v1/locked_accounts/route.ts +++ b/apps/staking/src/app/api/v1/locked_accounts/route.ts @@ -4,7 +4,7 @@ import { clusterApiUrl, Connection, PublicKey } from "@solana/web3.js"; import type { NextRequest } from "next/server"; import { z } from "zod"; -import { IS_MAINNET, RPC } from "../../../../config/server"; +import { BACKEND_RPC, IS_MAINNET } from "../../../../config/server"; import { tokensToString } from "../../../../tokens"; const UnlockScheduleSchema = z.object({ @@ -37,7 +37,7 @@ const isValidPublicKey = (publicKey: string) => { export async function GET(req: NextRequest) { const stakingClient = new PythStakingClient({ connection: new Connection( - RPC ?? + BACKEND_RPC ?? clusterApiUrl( IS_MAINNET ? WalletAdapterNetwork.Mainnet diff --git a/apps/staking/src/config/server.ts b/apps/staking/src/config/server.ts index a41c75da03..22b1a3a4ee 100644 --- a/apps/staking/src/config/server.ts +++ b/apps/staking/src/config/server.ts @@ -52,6 +52,7 @@ export const WALLETCONNECT_PROJECT_ID = demandInProduction( "WALLETCONNECT_PROJECT_ID", ); export const RPC = process.env.RPC; +export const BACKEND_RPC = process.env.BACKEND_RPC; export const IS_MAINNET = process.env.IS_MAINNET !== undefined; export const HERMES_URL = getOr("HERMES_URL", "https://hermes.pyth.network"); export const BLOCKED_REGIONS = transformOr("BLOCKED_REGIONS", fromCsv, []);