mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
30 lines
656 B
TypeScript
30 lines
656 B
TypeScript
import type { Feature } from './types';
|
|
|
|
import { getEnvValue } from '../utils';
|
|
|
|
const title = 'MegaETH chain';
|
|
|
|
const socketUrlMetrics = getEnvValue('NEXT_PUBLIC_MEGA_ETH_SOCKET_URL_METRICS');
|
|
const socketUrlRpc = getEnvValue('NEXT_PUBLIC_MEGA_ETH_SOCKET_URL_RPC');
|
|
|
|
const config: Feature<{ socketUrl: { metrics?: string; rpc?: string } }> = (() => {
|
|
|
|
if (socketUrlMetrics || socketUrlRpc) {
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: true,
|
|
socketUrl: {
|
|
metrics: socketUrlMetrics,
|
|
rpc: socketUrlRpc,
|
|
},
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: false,
|
|
});
|
|
})();
|
|
|
|
export default config;
|