-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(yield): return liquidity pools info #99
Conversation
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.
nice one!
Just a couple of nits
I stil don't get what's the API naming convention here. Maybe we can discuss it synchronously while we deploy this |
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.
Other than the endpoint names, where to be honest I don't care too much anymore I have some small concern :)
One concern with this PR is that, so far we made that BFF can be easily cloned and launched locally.
This PR introduces one dependency. We need to provide the CoW AMM DB details, or it will try to connect to 127.0.0.1:5432

For example, for coingecko proxy we made the env optional, and we just printed an error if its missconfigured
Would it make sense to do something like this here?
We can throw an error if the env is not set up for example and show in the logs what's the issue
I will give you the soft approve as I think this PR is quite good.
tsconfig.base.json
Outdated
@@ -20,6 +20,7 @@ | |||
"strict": true, | |||
"strictNullChecks": true, | |||
"alwaysStrict": true, | |||
"strictPropertyInitialization": false, |
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.
Why do we want this? https://www.typescriptlang.org/tsconfig/#strictPropertyInitialization
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.
![]() @anxolin I've enhanced the db connection error handling |
Thanks a lot, looks way better now. Sorry it took me a while to re-review this |
There are two new endpoints:
https://bff.barn.cow.fi/42161/yield/pools-average-apr - returns average APR per provider
https://bff.barn.cow.fi/42161/yield/pools - returns pools info (tvl, apr, etc.)
BFF endpoint instead of this mock.
This data is used for Vampire attack.