Skip to content

Commit

Permalink
Merge branch 'main' into fix/base-url
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrsoares authored Feb 14, 2024
2 parents 71eced9 + 38ddeea commit a544eba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cli/wizard/commands/list-squid-token/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function parseAsInterchainTokenConfig(
axelarChainId: data.axelarChainId,
tokenAddress: address.parse(data.tokenAddress),
tokenManager: address.parse(data.tokenManagerAddress),
tokenManagerType: convertToCamelCase(data.tokenManagerType),
tokenManagerType: snakeToCamelCase(data.tokenManagerType),
},
],
...data.remoteTokens.map((token) => ({
Expand All @@ -212,7 +212,7 @@ function parseAsInterchainTokenConfig(
axelarChainId: token.axelarChainId,
tokenAddress: address.parse(token.tokenAddress),
tokenManager: address.parse(token.tokenManagerAddress),
tokenManagerType: convertToCamelCase(token.tokenManagerType),
tokenManagerType: snakeToCamelCase(token.tokenManagerType),
})),
],
};
Expand All @@ -222,6 +222,4 @@ function getEnvironmentFromUrl(tokenDetailsUrl: string) {
return tokenDetailsUrl?.includes("testnet") ? "testnet" : "mainnet";
}

function convertToCamelCase(input: string) {
return convertCase("CONSTANT_CASE", "camelCase")(input ?? "unknown");
}
const snakeToCamelCase = convertCase("snake_case", "camelCase");

0 comments on commit a544eba

Please sign in to comment.