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

Initial addition of staBal routes. #141

Merged
merged 30 commits into from
Oct 1, 2021

Conversation

johngrantuk
Copy link
Member

No description provided.

@TomAFrench
Copy link
Contributor

It's not really clear what's going on here, I think we need to add more documentation on what the flow of the algorithm is doing. It looks like we're going to be passing along incomplete paths to later stages of the algorithm.

Copy link
Contributor

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

I've pushed a couple of changes to mostly rename some variables/comments and have better return values for some functions.

I think we're still overloading filterPoolsOfInterest however and the tests can be deduplicated. Happy with the general algo though.

@@ -0,0 +1,355 @@
// TS_NODE_PROJECT='tsconfig.testing.json' npx mocha -r ts-node/register test/staBalPaths.spec.ts
Copy link
Contributor

Choose a reason for hiding this comment

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

Many of these tests are pretty much copy pastes from each other. Can you deduplicate these where you're just passing in different inputs to the same code?

This is something that we need to be doing generally with this codebase. The amount of duplication in the tests is huge.

Copy link
Member Author

Choose a reason for hiding this comment

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

Deduplicated and added more thorough Path testing.

src/routeProposal/filtering.ts Outdated Show resolved Hide resolved
src/routeProposal/filtering.ts Outdated Show resolved Hide resolved
src/constants.ts Outdated Show resolved Hide resolved
@TomAFrench TomAFrench marked this pull request as ready for review September 29, 2021 13:44
Copy link
Contributor

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

LGTM. @johngrantuk can you check you're happy with these final changes?

Ah, forgot you're improving some of the tests, nvm.

@johngrantuk
Copy link
Member Author

@TomAFrench I've changed the previously highlighted tests to use all pools. Also updated where required to make things work after the removal of BigNumber.js. Would probably benefit from another quick check.

constants.ts needs updated with USDCCONNECTINGPOOL and STABALADDR information once those pools are deployed on Polygon so not sure if we merge before or after that?

@TomAFrench
Copy link
Contributor

I've changed the previously highlighted tests to use all pools. Also updated where required to make things work after the removal of BigNumber.js. Would probably benefit from another quick check.

Thanks, I'll give this a check over in a bit and then merge.

constants.ts needs updated with USDCCONNECTINGPOOL and STABALADDR information once those pools are deployed on Polygon so not sure if we merge before or after that?

This isn't an issue. We just need to remove the entries for each networks and we'll fall straight through the new function so we can merge now.

@johngrantuk johngrantuk merged commit eb83401 into develop Oct 1, 2021
@johngrantuk johngrantuk deleted the john/v2-package-staBal-routes branch January 4, 2023 15:53
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.

None yet

2 participants