diff --git a/deploy/tools/envs-validator/schema.ts b/deploy/tools/envs-validator/schema.ts index 85966c74ed..1e7af2aa87 100644 --- a/deploy/tools/envs-validator/schema.ts +++ b/deploy/tools/envs-validator/schema.ts @@ -126,6 +126,19 @@ const rollupSchema = yup }), }); +const rampSchema = yup + .object() + .shape({ + NEXT_PUBLIC_RAMP_HOST_API_KEY: yup.string(), + NEXT_PUBLIC_RAMP_DEFAULT_ASSET: yup + .string() + .when('NEXT_PUBLIC_RAMP_HOST_API_KEY', { + is: (value: string) => Boolean(value), + then: (schema) => schema, + otherwise: (schema) => schema.max(-1, 'NEXT_PUBLIC_RAMP_DEFAULT_ASSET cannot not be used without NEXT_PUBLIC_RAMP_HOST_API_KEY'), + }), + }); + const adButlerConfigSchema = yup .object() .transform(replaceQuotes) @@ -459,6 +472,7 @@ const schema = yup .concat(rollupSchema) .concat(beaconChainSchema) .concat(bridgedTokensSchema) - .concat(sentrySchema); + .concat(sentrySchema) + .concat(rampSchema); export default schema; diff --git a/deploy/values/review-l2/values.yaml.gotmpl b/deploy/values/review-l2/values.yaml.gotmpl index cc12302377..3abb74e684 100644 --- a/deploy/values/review-l2/values.yaml.gotmpl +++ b/deploy/values/review-l2/values.yaml.gotmpl @@ -69,7 +69,7 @@ frontend: NEXT_PUBLIC_L1_BASE_URL: https://blockscout-main.k8s-dev.blockscout.com NEXT_PUBLIC_GRAPHIQL_TRANSACTION: 0x4a0ed8ddf751a7cb5297f827699117b0f6d21a0b2907594d300dc9fed75c7e62 NEXT_PUBLIC_USE_NEXT_JS_PROXY: true - NEXT_PUBLIC_RAMP_DEFAULT_ASSET: "ETH_ETH" + NEXT_PUBLIC_RAMP_DEFAULT_ASSET: "GOERLI_ETH" envFromSecret: NEXT_PUBLIC_RAMP_HOST_API_KEY: ref+vault://deployment-values/blockscout/dev/review?token_env=VAULT_TOKEN&address=https://vault.k8s.blockscout.com#/NEXT_PUBLIC_RAMP_HOST_API_KEY