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.55k forks source link

fix: Swap Infinite loading and error message not shown when user routing setting customized #10949

Open memoyil opened 1 week ago

memoyil commented 1 week ago

To reproduce

Turn off v2 from customize routing Pick a token that doesn't have v3 pool See it infinitely loading without showing message

Before:

image

After:

image


PR-Codex overview

This PR focuses on improving error handling and conditional logic in the trading process, specifically addressing trade errors and route validation in the swap functionality.

Detailed summary

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

vercel[bot] commented 1 week 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 Nov 17, 2024 4:01pm
6 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **aptos-web** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/aptos-web/CCu5ofDWqZBSCjHPJP6WXygqAJtR)) | [Visit Preview](https://aptos-web-git-feature-fixinfiniteloadingwhenuserrouteset-7ab1e0.pancake.run) | | Nov 17, 2024 4:01pm | | **blog** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/blog/3dgWXPzsZDXzkgs9bfpP2npnJCyo)) | [Visit Preview](https://blog-git-feature-fixinfiniteloadingwhenuserroutesettingc-010bbe.pancake.run) | | Nov 17, 2024 4:01pm | | **bridge** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/bridge/35xFhPHn481ccTErCYWzRTXGHLeB)) | [Visit Preview](https://bridge-git-feature-fixinfiniteloadingwhenuserroutesettin-c882ba.pancake.run) | | Nov 17, 2024 4:01pm | | **games** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/games/FVHm5KrmEMw3rfShMT9NXgyyX33u)) | [Visit Preview](https://games-git-feature-fixinfiniteloadingwhenuserroutesetting-78b43d.pancake.run) | | Nov 17, 2024 4:01pm | | **gamification** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/gamification/6KSkhvUNpgmWQ5dfNzkZ4XNnhJS5)) | [Visit Preview](https://gamification-git-feature-fixinfiniteloadingwhenuserroute-a7b86e.pancake.run) | | Nov 17, 2024 4:01pm | | **uikit** | ⬜️ Ignored ([Inspect](https://vercel.com/pancakeswap/uikit/DBgu1cdK3ETekWZwC42X3yYeCxv8)) | [Visit Preview](https://uikit-git-feature-fixinfiniteloadingwhenuserroutesetting-04b81b.pancake.run) | | Nov 17, 2024 4:01pm |
changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 07faa3fe7d10ba0b2b294968fb753591f10f7100

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