Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
fix root service
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsichury committed Oct 21, 2023
1 parent 5905f49 commit c663b9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/client/Web3RegistryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ export class Web3RegistryClient {

async getPeersFromRegistry(): Promise<any> {
let urls: string[] = []
Object.keys(this.contracts).forEach(
async (chainId) => {
const provider = getProviderUrl(+chainId, this.apiKey)
const nodes = await this.getCleanedUrls(provider, +chainId)
urls = [...urls, ...nodes,]
}
);

console.log(urls)
const chainIds = Object.keys(this.contracts);
for (const chainId of chainIds){
const provider = getProviderUrl(+chainId, this.apiKey)
const nodes = await this.getCleanedUrls(provider, +chainId)
urls = [...urls, ...nodes,]
}
return urls
}

Expand Down
1 change: 1 addition & 0 deletions src/client/getRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export async function getRegistry(conf: any, peers: Peers, previsousChainObserve
}

const registry = new Web3RegistryClient(apiKey, peers);
await registry.connect(+network)
for (const chain of previsousChainObserved){
await registry.connect(chain)
}
Expand Down

0 comments on commit c663b9b

Please sign in to comment.