-
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: Inaccurate quote after on chain verification (#10808)
<!-- 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 adds gas usage estimates to the quote functionality in the `@pancakeswap/routing-sdk-addon-quoter`. It modifies the quote fetching logic and updates types to include gas usage information, enhancing the functionality for users to better understand transaction costs. ### Detailed summary - Updated `fetchV3Quote.ts` to return `gasUseEstimate` alongside the quote. - Modified `fetchQuotes.ts` to include `gasUseEstimate` in the results. - Revised `types.ts` to define a new `Quote` type that includes `gasUseEstimate`. - Enhanced `useTradeVerifiedByQuoter.ts` to handle the new quote structure and adjust amounts based on gas estimates. - Introduced a `reviseGasUseEstimate` function to adjust gas estimates based on trade type. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
1 parent
bab8589
commit 142947f
Showing
5 changed files
with
71 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@pancakeswap/routing-sdk-addon-quoter': major | ||
--- | ||
|
||
Add gas use estimate to quote |
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