Files
tom goriunovandGitHub e6b7dbe3e0 Fixes for Release v2.7.0 (#3310)
* fix: correct optional chaining in label-issues-in-release workflow

- Updated the filter condition to ensure proper handling of optional chaining for issue labels when label doesn't have a description

* add reown to ignored origins of errors in rollbar monitoring

* export HintProps

* add recipe for Code component and adjust select component props

* fix screenshots

* fix validator schema for multichain explorer

* fix mobile lists in safari

* screenshot update

* deprecate NEXT_PUBLIC_ROLLUP_L1_BASE_URL env

* add support of new Tac operation type

* remove recaptcha token from query params

* add skin for multichain

* update multichain config

* fix: og meta tags were not rendered on the server

* enable NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE var for multichain

* disable e2e test job
2026-03-02 13:52:09 +01:00

77 lines
2.8 KiB
TypeScript

declare module 'yup' {
interface StringSchema {
// Yup's URL validator is not perfect so we made our own
// https://github.com/jquense/yup/pull/1859
url(): never;
}
}
import * as yup from 'yup';
import { urlTest, protocols } from './utils';
import * as uiSchemas from './schemas/ui';
import * as featuresSchemas from './schemas/features';
import servicesSchemas from './schemas/services';
import { replaceQuotes } from 'configs/app/utils';
import { IDENTICON_TYPES } from 'types/views/address';
const schema = yup
.object()
.noUnknown(true, (params) => {
return `Unknown ENV variables were provided: ${ params.unknown }`;
})
.shape({
// I. Build-time ENVs
// -----------------
NEXT_PUBLIC_GIT_TAG: yup.string(),
NEXT_PUBLIC_GIT_COMMIT_SHA: yup.string(),
// II. Run-time ENVs
// -----------------
// 1. App configuration
NEXT_PUBLIC_APP_HOST: yup.string().required(),
NEXT_PUBLIC_APP_PROTOCOL: yup.string().oneOf(protocols),
NEXT_PUBLIC_APP_PORT: yup.number().positive().integer(),
NEXT_PUBLIC_APP_ENV: yup.string(),
NEXT_PUBLIC_APP_INSTANCE: yup.string(),
// 2. Blockchain parameters
NEXT_PUBLIC_NETWORK_NAME: yup.string().required(),
NEXT_PUBLIC_NETWORK_SHORT_NAME: yup.string(),
NEXT_PUBLIC_IS_TESTNET: yup.boolean(),
// 3. UI views configuration
// Some settings that we actually support in multichain mode
NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE: yup.string().oneOf(IDENTICON_TYPES),
// 5. Features configuration
// NOTE!: Not all features are supported in multichain mode, and some of them not relevant or enabled per chain basis
// Below listed supported features and the features that are enabled by default, so we have to turn them off
NEXT_PUBLIC_OG_DESCRIPTION: yup.string(),
NEXT_PUBLIC_OG_IMAGE_URL: yup.string().test(urlTest),
NEXT_PUBLIC_GAS_TRACKER_ENABLED: yup.boolean().equals([false]),
NEXT_PUBLIC_ADVANCED_FILTER_ENABLED: yup.boolean().equals([false]),
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED: yup.boolean().equals([false]),
NEXT_PUBLIC_API_DOCS_TABS: yup.array().transform(replaceQuotes).json().max(0),
// 6. Multichain configuration
NEXT_PUBLIC_MULTICHAIN_ENABLED: yup.boolean(),
NEXT_PUBLIC_MULTICHAIN_CLUSTER: yup.string(),
NEXT_PUBLIC_MULTICHAIN_AGGREGATOR_API_HOST: yup.string().test(urlTest),
NEXT_PUBLIC_MULTICHAIN_STATS_API_HOST: yup.string().test(urlTest),
// Misc
NEXT_PUBLIC_USE_NEXT_JS_PROXY: yup.boolean(),
})
.concat(uiSchemas.homepageSchema)
.concat(uiSchemas.navigationSchema)
.concat(uiSchemas.footerSchema)
.concat(uiSchemas.miscSchema)
.concat(featuresSchemas.adsSchema)
.concat(featuresSchemas.defiDropdownSchema)
.concat(featuresSchemas.multichainButtonSchema)
.concat(featuresSchemas.userOpsSchema)
.concat(servicesSchemas);
export default schema;