Files
Igor StuevandGitHub 67912498df Neon: Solana transactions (#2483)
* Neon: Solana transactions

* add neon-devnet to reviews

* add env validation for external txs feature

* txs -> txns

* review fix
2025-02-13 17:15:57 +01:00

28 lines
851 B
TypeScript

import type { Feature } from './types';
import type { TxExternalTxsConfig } from 'types/client/externalTxsConfig';
import { getEnvValue, parseEnvJson } from '../utils';
const externalTransactionsConfig = parseEnvJson<TxExternalTxsConfig>(getEnvValue('NEXT_PUBLIC_TX_EXTERNAL_TRANSACTIONS_CONFIG'));
const title = 'External transactions';
const config: Feature<{ chainName: string; chainLogoUrl: string; explorerUrlTemplate: string }> = (() => {
if (externalTransactionsConfig) {
return Object.freeze({
title,
isEnabled: true,
chainName: externalTransactionsConfig.chain_name,
chainLogoUrl: externalTransactionsConfig.chain_logo_url,
explorerUrlTemplate: externalTransactionsConfig.explorer_url_template,
});
}
return Object.freeze({
title,
isEnabled: false,
});
})();
export default config;