Skip to content

Commit

Permalink
remove validation
Browse files Browse the repository at this point in the history
  • Loading branch information
randy75828 committed Jan 9, 2025
1 parent 84f2b21 commit c45c92a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"blacklisted_markets",
"blacklisted_pools",
"blacklisted_tokens",
"token_name_override_map",
"transfer_options",
"network_fees",
"cross_selling_source_tokens",
Expand Down
1 change: 0 additions & 1 deletion configs/devnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
],
"blacklisted_pools": [],
"blacklisted_tokens": [],
"token_name_override_map": {},
"transfer_options": {},
"network_fees": {
"swth": 0,
Expand Down
1 change: 0 additions & 1 deletion configs/testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"blacklisted_pools": [],
"blacklisted_tokens": [],
"token_name_override_map": {},
"transfer_options": {},
"network_fees": {
"swth": 0,
Expand Down
16 changes: 0 additions & 16 deletions scripts/check_configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface ConfigJSON {
blacklisted_markets: string[];
blacklisted_pools: string[];
blacklisted_tokens: string[];
token_name_override_map: TokenNameOverrideMap;
transfer_options: {
[chainKey: string]: number;
};
Expand Down Expand Up @@ -244,17 +243,6 @@ function checkBlacklistedMarkets(marketData: string[], blacklistedMarkets: strin
};
}

function isValidTokenNameOverrideMap(tokenNameOverrideMap: TokenNameOverrideMap, denoms: string[], network: CarbonSDK.Network): boolean {
const denomKeysArr = Object.keys(tokenNameOverrideMap);
const invalidDenomsOutcome = checkValidEntries(denomKeysArr, denoms);
if (isErrorOutcome(invalidDenomsOutcome)) {
const invalidTokensStr = joinEntriesIntoStr(invalidDenomsOutcome.entry!);
console.error(`[ERROR] token_name_override_map of ${network}.json has the following invalid token denom keys: ${invalidTokensStr}. Please make sure to input only valid token denoms.`);
return false;
}
return true;
}

function isValidExternalChainChannels(chainChannels: ExternalChannelsObj, bridges: string[], network: CarbonSDK.Network): boolean {
const duplicateChainKeys: string[] = [];
const invalidChainKeys: string[] = [];
Expand Down Expand Up @@ -658,10 +646,6 @@ async function main() {

bridgesArr = polynetworkBridges.concat(ibcBridges).concat(axelarBridges)

// token_name_override_map check
const isTokenNameOverrideMapValid = isValidTokenNameOverrideMap(jsonData.token_name_override_map, tokens, network);
if (!isTokenNameOverrideMapValid) outcomeMap[network] = false;

const hasInvalidCrossSellingTokens = checkValidEntries(jsonData.cross_selling_source_tokens, tokens);
if (hasInvalidCrossSellingTokens.status && hasInvalidCrossSellingTokens.entry) {
let listOfInvalidTokens: string = hasInvalidCrossSellingTokens.entry.join(', ');
Expand Down

0 comments on commit c45c92a

Please sign in to comment.