-
Notifications
You must be signed in to change notification settings - Fork 92
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
Sor update 4.1.1 beta.12 #480
Conversation
johngrantuk
commented
Jul 5, 2023
•
edited by brunoguerios
Loading
edited by brunoguerios
- Update SOR package
- Update onchainData for FX pools
A lot has changed since this PR was opened, right?! 😅 |
…eta.12 # Conflicts: # balancer-js/src/modules/sor/pool-data/onChainData.ts
I updated the PR to conform with new queries helper contract. |
Code changed significantly requiring changes to the PR
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const abis: any = Object.values( | ||
// Remove duplicate entries using their names |
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 think you can use zipObject here
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.
Actually, forget about the zipObject, you don't even need the zipObject, Object.fromEntries and/or Object.values, you can remove duplicates using lodash uniqBy function:
const abis: any = _.uniqBy([...(FXPool__factory.abi as readonly JsonFragment[])], "name")