Skip to content

Conversation

@dijanin-brat
Copy link
Contributor

No description provided.

@dijanin-brat dijanin-brat self-assigned this Oct 15, 2025
*/
getSpokePoolAddresses(): (Address | undefined)[] {
return Object.values(this.spokePoolClients).map((client) => client.spokePoolAddress);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how useful this is as an array because the address alone isn't very useful without the corresponding chainId. Might make sense to just return an Object mapping chainId to Address.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @note This method returns all SpokePoolClient chainIds.
*/
getChainIds(): number[] {
return Object.keys(this.spokePoolClients).map(Number);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I prefer using the chainId member of the SpokePoolClient instance itself.

Suggested change
return Object.keys(this.spokePoolClients).map(Number);
return Object.values(this.spokePoolClients).map({ chainId } => chainId);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am okey with that, but is there case where that can be different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants