Skip to content

Commit

Permalink
fix foreach command on relayer and chains (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed May 15, 2024
1 parent 2247ca4 commit afd7bd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/js/packages/starshipjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starshipjs",
"version": "1.2.0",
"version": "1.3.0",
"author": "Dan Lynch <pyramation@gmail.com>",
"description": "JS utilities for Starship",
"main": "index.js",
Expand Down
4 changes: 2 additions & 2 deletions clients/js/packages/starshipjs/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export const useRegistry = async (configFile: string): Promise<ChainRegistryFetc
const registryUrl = `http://localhost:${config.registry.ports.rest}`;

const urls: string[] = [];
config.chains.forEach((chain) => {
config.chains?.forEach((chain) => {
urls.push(
`${registryUrl}/chains/${chain.name}`,
`${registryUrl}/chains/${chain.name}/assets`
);
});
config.relayers.forEach((relayer) => {
config.relayers?.forEach((relayer) => {
urls.push(
`${registryUrl}/ibc/${relayer.chains[0]}/${relayer.chains[1]}`,
`${registryUrl}/ibc/${relayer.chains[1]}/${relayer.chains[0]}`
Expand Down

0 comments on commit afd7bd5

Please sign in to comment.