Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Token provider getHighestLiquidityPair #547

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

bmgalego
Copy link
Contributor

Relates to:

#467

Risks

Background

What does this PR do?

Fixes bug in getHighestLiquidityPair token providers

What kind of change is this?

Bug Fix

Documentation changes needed?

Testing

Where should a reviewer start?

Detailed testing steps

Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

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

Great work - please address comment and good to go :)

currentMarketCap > highestMarketCap)
) {
return currentPair;
return dexData.pairs.sort((a, b) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the same code in two places can we create a function and reuse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they are being used by different token providers in each chain plugin, right now the only common place is core and maybe not a good place to add it. For now I thinks its fine like this, maybe creating a service for proving tokens would be better place for this

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah makes sense feel free to just add an issue or TODO comment so it doesn't get lost. LGTM otherwise thanks so much!

@jkbrooks jkbrooks merged commit 56631d7 into elizaOS:main Nov 25, 2024
2 checks passed
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.

3 participants