-
Notifications
You must be signed in to change notification settings - Fork 9
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
[MEX-527] Bulk get methods #1535
base: feat/memory-store
Are you sure you want to change the base?
Conversation
- bulk get methods for various fields - update 'feesUSD' compute method signature to enable creating a dataloader for the field; update cache warmer + setter services; update usage in router service - fix unit tests
(tokenID) => tokenID === lpTokenID, | ||
); | ||
|
||
if (farmAddressIndex === -1) { |
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.
here you used:
if index === -1 { return undefined } else { return from array }
and in the function below you used:
return index === -1 { return undefined } else { return from array }
maybe keep consistency and choose a single way
return await getAllKeys<string>( | ||
this.cachingService, | ||
stakingProxyAddresses, | ||
'stakeProxy.stakingFarmAddress', |
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 would recommend putting all the keys in a cache.info.ts
because:
- we can easily see all the caching keys in a single place
- we can easily reuse the keys somewhere else
- it helps the overall code by avoiding magic strings in the code
Reasoning
Proposed Changes
getAllKeys
util function) for various fields of pairs, farms, staking farmsHow to test