Skip to content

Conversation

pxrl
Copy link
Collaborator

@pxrl pxrl commented Jul 25, 2025

Where the HubPoolClient is handling mainnet tokens, use Address.toNative().

Also some additional driveby fixes and tweaks.

Where the HubPoolClient is handling mainnet tokens, use Address.toNative().

Also some additional driveby fixes and tweaks.
Comment on lines 414 to 418
// Filter hubPoolTokens for duplicates by reverting to their native string
// representation. This is required for deduplication to work reliably.
const getHubPoolTokens = (): EvmAddress[] => dedupArray(
Object.values(hubPoolTokens).filter(isDefined).map((token) => token.toNative())
).map(EvmAddress.from);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Driveby fix - it's not recommended to use dedupArray() on complex types, so translate the addresses to strings before deduplicating.

Copy link
Member

Choose a reason for hiding this comment

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

This is a nice QoL fix

@pxrl pxrl requested a review from bmzig July 28, 2025 16:05
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