mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
21 lines
485 B
TypeScript
21 lines
485 B
TypeScript
import type { MultichainConfig } from 'types/multichain';
|
|
|
|
import config from 'configs/app';
|
|
import { isBrowser } from 'toolkit/utils/isBrowser';
|
|
|
|
import * as multichainConfigNodejs from './config.nodejs';
|
|
|
|
const multichainConfig: () => MultichainConfig | undefined = () => {
|
|
if (!config.features.multichain.isEnabled) {
|
|
return;
|
|
}
|
|
|
|
if (isBrowser()) {
|
|
return window.__multichainConfig;
|
|
}
|
|
|
|
return multichainConfigNodejs.getValue();
|
|
};
|
|
|
|
export default multichainConfig;
|