mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
27 lines
610 B
TypeScript
27 lines
610 B
TypeScript
import type { Feature } from './types';
|
|
|
|
import apis from '../apis';
|
|
import { getEnvValue } from '../utils';
|
|
|
|
const isEnabled = getEnvValue('NEXT_PUBLIC_MULTICHAIN_ENABLED') === 'true';
|
|
const cluster = getEnvValue('NEXT_PUBLIC_MULTICHAIN_CLUSTER');
|
|
|
|
const title = 'Multichain explorer';
|
|
|
|
const config: Feature<{ cluster: string }> = (() => {
|
|
if (apis.multichainAggregator && apis.multichainStats && isEnabled && cluster) {
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: true,
|
|
cluster,
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: false,
|
|
});
|
|
})();
|
|
|
|
export default config;
|