pancakeswap / pancake-frontend

:pancakes: Pancake main features (farms, pools, IFO, lottery, profiles)
https://pancakeswap.finance
GNU General Public License v3.0
2.7k stars 3.56k forks source link

perf: Enable amm trade hook when amount is available #10895

Closed memoyil closed 4 weeks ago

memoyil commented 4 weeks ago

PR-Codex overview

This PR introduces an enabled property that determines if a feature is active based on the presence of an amount. This change is reflected in both Twap.tsx and useSwapBestTrade.ts.

Detailed summary

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

changeset-bot[bot] commented 4 weeks ago

⚠️ No Changeset found

Latest commit: d1ed5cf483dc565dbd973f151ad38386e6fc090a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 4 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 0:01am
6 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **aptos-web** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/aptos-web/C6mvyyZjabqVzxhFGAtHLRzB7d2G)) | [Visit Preview](https://aptos-web-git-feature-perfenableammtradehookwhenamountis-c9b910.pancake.run) | | Oct 30, 2024 0:01am | | **blog** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/blog/FKQzmiJwR3H2wpHeyUSNuaAQfSiC)) | [Visit Preview](https://blog-git-feature-perfenableammtradehookwhenamountisavailable.pancake.run) | | Oct 30, 2024 0:01am | | **bridge** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/bridge/12GNjSZEZx512xpgNHxuHZAjvUYM)) | [Visit Preview](https://bridge-git-feature-perfenableammtradehookwhenamountisavailable.pancake.run) | | Oct 30, 2024 0:01am | | **games** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/games/57UYVGZpCkeUQudyHhiCS43XwPNo)) | [Visit Preview](https://games-git-feature-perfenableammtradehookwhenamountisavailable.pancake.run) | | Oct 30, 2024 0:01am | | **gamification** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/gamification/C6Z13yspWvkmrDbs1tAzcu72Dv4z)) | [Visit Preview](https://gamification-git-feature-perfenableammtradehookwhenamoun-95936d.pancake.run) | | Oct 30, 2024 0:01am | | **uikit** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/uikit/4uVBmQGMY6ZuibF9XDpfZ1yGV4TL)) | [Visit Preview](https://uikit-git-feature-perfenableammtradehookwhenamountisavailable.pancake.run) | | Oct 30, 2024 0:01am |