Skip to content

Commit bfbeb30

Browse files
committed
chore: update solana default rpc endpoint
1 parent 0db9dfd commit bfbeb30

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/plugins/RedPacket/src/SiteAdaptor/helpers/getSolanaProvider.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import { NetworkPluginID } from '@masknet/shared-base'
66
import { getConnection } from '@masknet/web3-providers'
77
import type { Cluster } from '@solana/web3.js'
88

9+
const SOLANA_ENDPOINT =
10+
process.env.SOLANA_RPC_ENDPOINT || 'https://solana-mainnet.g.alchemy.com/v2/7ktku04g0dx9l6ijyba3fy99h0ic0xf3'
911
export async function getSolanaConnection(cluster: Cluster | undefined) {
10-
const url =
11-
!cluster || cluster === 'mainnet-beta' ?
12-
'https://long-intensive-shard.solana-mainnet.quiknode.pro/bc297481b248232bcd0dc95197d5b32a8981539c'
13-
: SolanaWeb3.clusterApiUrl(cluster)
12+
const url = !cluster || cluster === 'mainnet-beta' ? SOLANA_ENDPOINT : SolanaWeb3.clusterApiUrl(cluster)
1413
return new SolanaWeb3.Connection(url, 'confirmed')
1514
}
1615

0 commit comments

Comments
 (0)