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