diff --git a/configs/app/chain.ts b/configs/app/chain.ts index a55c7baa64..56971abda6 100644 --- a/configs/app/chain.ts +++ b/configs/app/chain.ts @@ -1,5 +1,5 @@ import type { RollupType } from 'types/client/rollup'; -import type { NetworkVerificationType, NetworkVerificationTypeL1 } from 'types/networks'; +import type { NetworkVerificationType, NetworkVerificationTypeEnvs } from 'types/networks'; import { getEnvValue } from './utils'; @@ -14,7 +14,7 @@ const verificationType: NetworkVerificationType = (() => { if (rollupType === 'zkEvm') { return 'sequencing'; } - return getEnvValue('NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE') as NetworkVerificationTypeL1 || 'mining'; + return getEnvValue('NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE') as NetworkVerificationTypeEnvs || 'mining'; })(); const chain = Object.freeze({ diff --git a/deploy/tools/envs-validator/schema.ts b/deploy/tools/envs-validator/schema.ts index 69a11c92ee..bbad89aa7e 100644 --- a/deploy/tools/envs-validator/schema.ts +++ b/deploy/tools/envs-validator/schema.ts @@ -29,7 +29,7 @@ import { SUPPORTED_WALLETS } from '../../../types/client/wallets'; import type { CustomLink, CustomLinksGroup } from '../../../types/footerLinks'; import { CHAIN_INDICATOR_IDS } from '../../../types/homepage'; import type { ChainIndicatorId } from '../../../types/homepage'; -import { type NetworkVerificationTypeL1, type NetworkExplorer, type FeaturedNetwork, NETWORK_GROUPS } from '../../../types/networks'; +import { type NetworkVerificationTypeEnvs, type NetworkExplorer, type FeaturedNetwork, NETWORK_GROUPS } from '../../../types/networks'; import { COLOR_THEME_IDS } from '../../../types/settings'; import type { AddressViewId } from '../../../types/views/address'; import { ADDRESS_VIEWS_IDS, IDENTICON_TYPES } from '../../../types/views/address'; @@ -509,7 +509,7 @@ const schema = yup NEXT_PUBLIC_NETWORK_SECONDARY_COIN_SYMBOL: yup.string(), NEXT_PUBLIC_NETWORK_MULTIPLE_GAS_CURRENCIES: yup.boolean(), NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE: yup - .string().oneOf([ 'validation', 'mining' ]) + .string().oneOf([ 'validation', 'mining' ]) .when('NEXT_PUBLIC_ROLLUP_TYPE', { is: (value: string) => value === 'arbitrum' || value === 'zkEvm', then: (schema) => schema.test( diff --git a/docs/ENVS.md b/docs/ENVS.md index 9c752fc7b3..a763311d01 100644 --- a/docs/ENVS.md +++ b/docs/ENVS.md @@ -92,7 +92,7 @@ Please be aware that all environment variables prefixed with `NEXT_PUBLIC_` will | NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS | `string` | Network currency decimals | - | `18` | `6` | v1.0.x+ | | NEXT_PUBLIC_NETWORK_SECONDARY_COIN_SYMBOL | `string` | Network secondary coin symbol. | - | - | `GNO` | v1.29.0+ | | NEXT_PUBLIC_NETWORK_MULTIPLE_GAS_CURRENCIES | `boolean` | Set to `true` for networks where users can pay transaction fees in either the native coin or ERC-20 tokens. | - | `false` | `true` | v1.33.0+ | -| NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE | `validation` | `mining` | `posting` | Verification type in the network | - | `mining` | `validation` | v1.0.x+ | +| NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE | `validation` | `mining` | Verification type in the network. Irrelevant for Arbitrum (verification type is always `posting`) and ZkEvm (verification type is always `sequencing`) L2s | - | `mining` | `validation` | v1.0.x+ | | NEXT_PUBLIC_NETWORK_TOKEN_STANDARD_NAME | `string` | Name of the standard for creating tokens | - | `ERC` | `BEP` | v1.31.0+ | | NEXT_PUBLIC_IS_TESTNET | `boolean`| Set to true if network is testnet | - | `false` | `true` | v1.0.x+ | diff --git a/types/networks.ts b/types/networks.ts index cca0167265..fb729eb891 100644 --- a/types/networks.ts +++ b/types/networks.ts @@ -24,6 +24,6 @@ export interface NetworkExplorer { }; } -export type NetworkVerificationTypeL1 = 'mining' | 'validation'; -export type NetworkVerificationTypeL2 = 'posting' | 'sequencing'; -export type NetworkVerificationType = NetworkVerificationTypeL1 | NetworkVerificationTypeL2; +export type NetworkVerificationTypeEnvs = 'mining' | 'validation'; +export type NetworkVerificationTypeComputed = 'posting' | 'sequencing'; +export type NetworkVerificationType = NetworkVerificationTypeEnvs | NetworkVerificationTypeComputed;