Skip to content

feat(checkout): Return price impact as part of the quote#2646

Merged
keithbro-imx merged 8 commits into
mainfrom
dont-return-high-impact-quotes
Jun 4, 2025
Merged

feat(checkout): Return price impact as part of the quote#2646
keithbro-imx merged 8 commits into
mainfrom
dont-return-high-impact-quotes

Conversation

@keithbro-imx

@keithbro-imx keithbro-imx commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Hi👋, please ensure the PR title follows the below standards:

  • PR is titled with conventional commit style naming: type(scope): message. For example: feat(passport): my new feature
  • If you have introduced modification that necessitates immediate adjustments by this SDK's users to their applications, clients, or integrations to avert disruptions to existing features or functionalities, add a ! after the type(scope), for example feat(passport)!: my new breaking feature

Summary

Return price impact of the trade as part of the quote.

Detail and impact of the change

Note that this is the price impact as calculated by comparing the midprice of the route and the execution price of the quote. It does not look at or consider the price impact on any of the pools individually.

Added

Changed

Deprecated

Removed

Fixed

Security

Anything else worth calling out?

@nx-cloud

nx-cloud Bot commented Jun 3, 2025

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1879502.

Command Status Duration Result
nx affected -t build,lint,test ✅ Succeeded 2m 4s View ↗
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 1m 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-04 03:23:59 UTC

@keithbro-imx keithbro-imx changed the title fix(checkout): Don't return high impact quotes feat(checkout): Return price impact as part of the quote Jun 4, 2025
@keithbro-imx keithbro-imx marked this pull request as ready for review June 4, 2025 03:40
@keithbro-imx keithbro-imx requested a review from a team as a code owner June 4, 2025 03:40
tradeType: TradeType,
) {
const quoteAmount = quoteResult[amountIndex];
if (typeof quoteAmount !== 'bigint') throw new Error('Expected BigNumber');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could say expect bignumber but got ${typepof quoteAmont}` - helps with debugging

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true! this isn't new code fwiw, but i do agree.. i can update it in my next pr...

@keithbro-imx keithbro-imx added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit 29ec917 Jun 4, 2025
10 checks passed
@keithbro-imx keithbro-imx deleted the dont-return-high-impact-quotes branch June 4, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants