-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WIP: Label Breakdown api #10723
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
base: master
Are you sure you want to change the base?
WIP: Label Breakdown api #10723
Conversation
defi/src/api2/routes/dimensions.ts
Outdated
const validMetricTypesSet = new Set(Object.values(AdaptorRecordType)) as Set<string> | ||
const validRecordTypesSet = new Set(Object.values(AdaptorRecordType)) as Set<string> |
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.
There was some confusion here, I guess →
const validMetricTypesSet = new Set(Object.values(AdapterType)) as Set<string>
const validRecordTypesSet = new Set(Object.values(AdaptorRecordType)) as Set<string>
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.
ah, good catch
9ebb946
to
5fd75e5
Compare
- return breakdown methodology field - include breakdown data in parent protocol
The PR looks good to me, I didn’t see any blocking code or errors. Locally, the API works and correctly returns the methodologies on the pro routes. defillama-server/defi/src/api2/routes/dimensions.ts Lines 47 to 50 in 7f47751
→ You need to add
|
This PR includes a bunch of small refactors and optimizations, but major change is pulling dimension fee breakdown (by custom label) and exposing it via api:
types.ts
cron/dimensions.ts
to make the file look (little) less daunting, added more commentsaggregated
from dimensions record withaggObject
, I had a good reason, but cant recall why now, think I probably tried to remove it, but realized that if record contains non dataType fields, makes bit more of of a pain to iterate, right now, we know that all keys in aggObject are dataType (like dailyFees, dailyRevenue, etc)What is missing/needs to be fixed: