From 2b6851acf080633d600039d7e7e5face0a95a57c Mon Sep 17 00:00:00 2001 From: Yuru Shao Date: Wed, 22 Jan 2025 23:28:25 -0800 Subject: [PATCH] gui: fix tx prc --- anchor/src/client/base.ts | 5 +++-- playground/.env.local.example | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/anchor/src/client/base.ts b/anchor/src/client/base.ts index e5c6062f..ce084978 100644 --- a/anchor/src/client/base.ts +++ b/anchor/src/client/base.ts @@ -264,9 +264,10 @@ export class BaseClient { signerOverride?: Keypair, ): Promise { // Use dedicated connection for sending transactions if available - const { NEXT_PUBLIC_TX_RPC, TX_RPC } = process.env; const txConnection = new Connection( - NEXT_PUBLIC_TX_RPC || TX_RPC || this.provider.connection.rpcEndpoint, + process.env?.NEXT_PUBLIC_TX_RPC || + process.env.TX_RPC || + this.provider.connection.rpcEndpoint, { commitment: "confirmed", }, diff --git a/playground/.env.local.example b/playground/.env.local.example index 2ff80ff2..8c201a7c 100644 --- a/playground/.env.local.example +++ b/playground/.env.local.example @@ -1,4 +1,4 @@ NEXT_PUBLIC_SOLANA_RPC=https://api.mainnet-beta.solana.com -NEXT_PUBLIC_GLAM_API=https://api.glam.systems +NEXT_PUBLIC_TX_RPC=https://staked.helius-rpc.com/?api-key= NEXT_PUBLIC_ENABLED_ROUTES=/,/flows,/holdings,/trade,/settings NEXT_PUBLIC_HELIUS_API_KEY=helius_api_key