<commit_before>// @flow
import {
  MAINNET_EXPLORER_URL,
  STAGING_EXPLORER_URL,
  TESTNET_EXPLORER_URL,
  DEVELOPMENT_EKG_URL,
  STAGING_EKG_URL,
  TESTNET_EKG_URL,
} from '../config/urlsConfig';
import serialize from './serialize';
import { MAINNET, STAGING, TESTNET } from '../../../common/types/environment.types';

const localesFillForm = {
  'en-US': 'English',
  'ja-JP': 'Japanese',
};

const {
  version, os, API_VERSION, NETWORK,
  build, buildNumber, installerVersion
} = global.environment;

export const getNetworkExplorerUrl = (network: string): string => {
  // sets default to mainnet in case env.NETWORK is undefined
  let explorerUrl = MAINNET_EXPLORER_URL;
  if (network === MAINNET) { explorerUrl = MAINNET_EXPLORER_URL; }
  if (network === STAGING) { explorerUrl = STAGING_EXPLORER_URL; }
  if (network === TESTNET) { explorerUrl = TESTNET_EXPLORER_URL; }
  return explorerUrl; // sets default to mainnet incase env.NETWORK is undefined
};

export const getNetworkEkgUrl = (env: {
  isDev: boolean,
  isStaging: boolean,
  isTestnet: boolean
}) => {
  // sets default to development in case env.NETWORK is undefined
  let ekgUrl = DEVELOPMENT_EKG_URL;
  if (env.isDev) { ekgUrl = DEVELOPMENT_EKG_URL; }
  if (env.isStaging) { ekgUrl = STAGING_EKG_URL; }
  if (env.isTestnet) { ekgUrl = TESTNET_EKG_URL; }
  return ekgUrl;
};

export const getSupportUrl = async (baseUrl: string, locale: string) => {
  const network = NETWORK === 'development' ? 'staging' : NETWORK;
  const info = {
    frontendVersion: version,
    backendVersion: API_VERSION,
    network,
    build,
    installerVersion,
    os,
    locale,
    product: `Daedalus wallet - ${network}`,<commit_msg>[DDW-459] Updates environment variable names<commit_after>// @flow
import {
  MAINNET_EXPLORER_URL,
  STAGING_EXPLORER_URL,
  TESTNET_EXPLORER_URL,
  DEVELOPMENT_EKG_URL,
  STAGING_EKG_URL,
  TESTNET_EKG_URL,
} from '../config/urlsConfig';
import serialize from './serialize';
import { MAINNET, STAGING, TESTNET } from '../../../common/types/environment.types';

const localesFillForm = {
  'en-US': 'English',
  'ja-JP': 'Japanese',
};

const {
  version, os, apiVersion, network: NETWORK,
  build, buildNumber, installerVersion
} = global.environment;

export const getNetworkExplorerUrl = (network: string): string => {
  // sets default to mainnet in case env.NETWORK is undefined
  let explorerUrl = MAINNET_EXPLORER_URL;
  if (network === MAINNET) { explorerUrl = MAINNET_EXPLORER_URL; }
  if (network === STAGING) { explorerUrl = STAGING_EXPLORER_URL; }
  if (network === TESTNET) { explorerUrl = TESTNET_EXPLORER_URL; }
  return explorerUrl; // sets default to mainnet incase env.NETWORK is undefined
};

export const getNetworkEkgUrl = (env: {
  isDev: boolean,
  isStaging: boolean,
  isTestnet: boolean
}) => {
  // sets default to development in case env.NETWORK is undefined
  let ekgUrl = DEVELOPMENT_EKG_URL;
  if (env.isDev) { ekgUrl = DEVELOPMENT_EKG_URL; }
  if (env.isStaging) { ekgUrl = STAGING_EKG_URL; }
  if (env.isTestnet) { ekgUrl = TESTNET_EKG_URL; }
  return ekgUrl;
};

export const getSupportUrl = async (baseUrl: string, locale: string) => {
  const network = NETWORK === 'development' ? 'staging' : NETWORK;
  const info = {
    frontendVersion: version,
    backendVersion: apiVersion,
    network,
    build,
    installerVersion,
    os,
    locale,
    product: `Daedalus wallet - ${network}`,
{'fraction_non_alphanumeric': 0.11936805149210064, 'fraction_numerical': 0.0008777062609713282, 'mean_word_length': 4.188163884673748, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2998850', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1201, 'n_words': 292}