Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use offchain quote if failed to verify on chain (#10857)
<!-- 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 modifying the `useTradeVerifiedByQuoter` hook to enhance its behavior regarding data fetching and error handling. ### Detailed summary - Added `retry: false` to the hook options. - Set `refetchOnWindowFocus: false` to prevent refetching when the window is focused. - Introduced `placeholderData: keepPreviousData` for improved data retention. - Adjusted `staleTime` calculation based on `trade?.inputAmount.currency.chainId`. - Removed the line setting `error` to `error ?? p.error`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information