-
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.
feat: Add debounce and abort signal to position manager, make calls p…
…er chain instead of per gauge (#10906) <!-- 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 focuses on enhancing the `fetchPositionManager` and `getPositionManagerName` functions to support cancellation through `AbortSignal`. It also updates the `useQuery` hooks in various components to utilize these changes, improving error handling and performance. ### Detailed summary - Updated `fetchPositionManager` to accept an optional `signal` parameter for cancellation. - Improved error handling in `fetchPositionManager` and `getPositionManagerName`. - Modified `useQuery` in `usePositionManager` and `usePositionManagerName` to use the new `signal` parameter. - Enhanced `useFilteredGauges` to handle asynchronous fetching with cancellation. - Added `anySignal` utility function to manage multiple abort signals. - Updated the `getPositionManagerName` function to handle an optional `vaults` parameter and signal. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
5 changed files
with
140 additions
and
90 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
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
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
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
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