Skip to content

Commit

Permalink
token config
Browse files Browse the repository at this point in the history
  • Loading branch information
whitetechna committed Apr 9, 2024
1 parent fc9f19f commit bf49529
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { promises as fs } from 'fs';
import path from 'path';
import { Project, SourceFile, VariableDeclarationKind } from 'ts-morph';

import configuredChainsSchema from '../../config/schemas/configuredChains.schema.json';
import configuredCustomTokensSchema from '../../config/schemas/configuredCustomTokens.schema.json'; // Corrected import
import type { Token } from '../../src/libs/token/types';
import { decodeBase64ToJson } from './../utils/decodeBase64ToJson';
import { formatSourceFile } from './../utils/formatSourceFile';
Expand Down Expand Up @@ -39,8 +39,8 @@ export function generateCustomTokenConfig() {
// Decode base64 encoded JSON string
configuredTokenConfigFile = decodeBase64ToJson(process.env.CONFIGURED_CUSTOM_TOKENS || '');

// Valide JSON against schema
const isValid = validateJsonAgainstSchema(configuredTokenConfigFile, configuredChainsSchema);
// Validate JSON against schema
const isValid = validateJsonAgainstSchema(configuredTokenConfigFile, configuredCustomTokensSchema); // Corrected schema

if (!isValid) {
throw new Error('encoded generateCustomTokenConfig.json is not valid.');
Expand Down

0 comments on commit bf49529

Please sign in to comment.