remove cluster env var and link explorer txs to correct cluster
This commit is contained in:
parent
8c674ec1fd
commit
5d550e58b3
|
@ -5,7 +5,7 @@ import {
|
|||
InformationCircleIcon,
|
||||
XCircleIcon,
|
||||
} from '@heroicons/react/outline'
|
||||
import useMangoStore from '../stores/useMangoStore'
|
||||
import useMangoStore, { CLUSTER } from '../stores/useMangoStore'
|
||||
import { Notification, notify } from '../utils/notifications'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Loading from './Loading'
|
||||
|
@ -143,7 +143,9 @@ const Notification = ({ notification }: { notification: Notification }) => {
|
|||
) : null}
|
||||
{txid ? (
|
||||
<a
|
||||
href={'https://explorer.solana.com/tx/' + txid}
|
||||
href={
|
||||
'https://explorer.solana.com/tx/' + txid + '?cluster=' + CLUSTER
|
||||
}
|
||||
className="flex items-center mt-1 text-sm"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
|
|
|
@ -52,8 +52,8 @@ export const ENDPOINTS: EndpointInfo[] = [
|
|||
]
|
||||
|
||||
type ClusterType = 'mainnet' | 'devnet'
|
||||
|
||||
const CLUSTER = (process.env.NEXT_PUBLIC_CLUSTER as ClusterType) || 'mainnet'
|
||||
const DEFAULT_MANGO_GROUP_NAME = process.env.NEXT_PUBLIC_GROUP || 'devnet.2'
|
||||
export const CLUSTER = DEFAULT_MANGO_GROUP_NAME.split('.')[0] as ClusterType
|
||||
const ENDPOINT = ENDPOINTS.find((e) => e.name === CLUSTER)
|
||||
|
||||
export const WEBSOCKET_CONNECTION = new Connection(
|
||||
|
@ -61,7 +61,6 @@ export const WEBSOCKET_CONNECTION = new Connection(
|
|||
'processed' as Commitment
|
||||
)
|
||||
|
||||
const DEFAULT_MANGO_GROUP_NAME = process.env.NEXT_PUBLIC_GROUP || 'mainnet.1'
|
||||
export const DEFAULT_MANGO_GROUP_CONFIG = Config.ids().getGroup(
|
||||
CLUSTER,
|
||||
DEFAULT_MANGO_GROUP_NAME
|
||||
|
|
Loading…
Reference in New Issue