-
Notifications
You must be signed in to change notification settings - Fork 136
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
Conversation
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. |
… USDCCONNECTINGPOOL.
… match style of other functions
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
parsePoolPairData doesn't perform any side-effects and we're not using the return value
Personal preference.
There was a problem hiding this 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.
@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.
|
Thanks, I'll give this a check over in a bit and then merge.
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. |
No description provided.