-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: TVL and Volume issue on farm page (#10837)
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the functionality of the `fetcher.ts` file by adding support for fetching TVL (Total Value Locked) and volume data for V3 pools from a subgraph. It introduces new types, functions, and integrates the data into the existing farm pool fetching logic. ### Detailed summary - Added imports for `dayjs`, `GraphQLClient`, and `lodash/groupBy`. - Defined new types: `PoolIdentifier`, `WithTvlAndVolume`, `PoolWithTvlVolume`, and `V3PoolResult`. - Implemented `getPoolKey` function to create unique pool identifiers. - Created `fetchV3PoolsTvlVolumeFromSubgraph` to fetch TVL and volume data for V3 pools. - Developed `createSubgraphTvlVolumeFetcher` to manage caching of fetched data. - Updated `fetchExplorerFarmPools` to include TVL and volume data in the returned pool objects. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
1 parent
48063be
commit 9d0e560
Showing
1 changed file
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters