Skip to content

Commit

Permalink
use correct string for chain name
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Dec 11, 2024
1 parent 5d4b7e6 commit 8a7e4da
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions web/src/config/chainConfigs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ export function cosmosChainNameFromId(chainId: string) {
* Converts an IbcChainInfo object to a CosmosChain object for use with CosmosKit.
*/
function ibcChainInfoToCosmosChain(chain: IbcChainInfo): CosmosChain {
const chainId = cosmosChainNameFromId(chain.chainId);
return {
...chain,
chain_name: chainId,
chain_id: chainId,
chain_name: cosmosChainNameFromId(chain.chainId),
chain_id: chain.chainId,
chain_type: "cosmos",
};
}
Expand Down Expand Up @@ -82,8 +81,10 @@ export function ibcChainInfosToCosmosKitAssetLists(
ibcChains: IbcChains,
): AssetList[] {
return Object.values(ibcChains).map((chain) => {
const chainId = cosmosChainNameFromId(chain.chainId);
return ibcCurrenciesToCosmosKitAssetList(chainId, chain.currencies);
return ibcCurrenciesToCosmosKitAssetList(
cosmosChainNameFromId(chain.chainId),
chain.currencies,
);
});
}

Expand Down

0 comments on commit 8a7e4da

Please sign in to comment.