-
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: Crash swap trade details (#10818)
<!-- 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 improving the handling of trade details and quotes in the `TradeDetails` and `useBestAMMTrade` components, ensuring better management of input amounts and the loading state of trades. ### Detailed summary - Updated `gasTokenSelector` to use `inputAmount` instead of `order?.trade.inputAmount`. - Enhanced conditional checks for trade amounts in `useBestAMMTrade`. - Introduced `tradeLoaded` boolean to track the loading state of the final order in `useAllTypeBestTrade`. - Adjusted `bestOrder` assignment logic to ensure it reflects the input and output amounts correctly. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
3 changed files
with
10 additions
and
5 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