fix lite rpc

This commit is contained in:
Adrian Brzeziński 2024-06-12 22:52:59 +02:00
parent 6d5d17620a
commit f54ee602d8
2 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,10 @@ import {
import useNetworkSpeed from 'hooks/useNetworkSpeed'
import { useWallet } from '@solana/wallet-adapter-react'
import useLocalStorageState from 'hooks/useLocalStorageState'
import { DEFAULT_PRIORITY_FEE_LEVEL } from './settings/RpcSettings'
import {
DEFAULT_PRIORITY_FEE_LEVEL,
LITE_RPC_URL,
} from './settings/RpcSettings'
import { useHiddenMangoAccounts } from 'hooks/useHiddenMangoAccounts'
import { notify } from 'utils/notifications'
import { usePlausible } from 'next-plausible'
@ -274,7 +277,7 @@ const handleEstimateFeeWithWs = (
let lastFee: null | number = null
let reportedUndefinedFeeCount = 0
const wsUrl = new URL('wss://api.mngo.cloud/lite-rpc/v1/')
const wsUrl = new URL(LITE_RPC_URL.replace('https', 'wss'))
ws = new WebSocket(wsUrl)
ws.addEventListener('open', () => {

View File

@ -13,7 +13,7 @@ export const TRITON_DEDICATED_URL = process.env.NEXT_PUBLIC_TRITON_TOKEN
? `https://mango.rpcpool.com/${process.env.NEXT_PUBLIC_TRITON_TOKEN}`
: 'https://mango.rpcpool.com/946ef7337da3f5b8d3e4a34e7f88'
export const LITE_RPC_URL = 'https://api.mngo.cloud/lite-rpc/v1/'
export const LITE_RPC_URL = `https://rpc.mngo.cloud/${process.env.NEXT_PUBLIC_LITE_RPC_TOKEN}`
const RPC_URLS = [
{