Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 4, 2025

Conversation

keithbro-imx
Copy link
Contributor

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

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?

Copy link

nx-cloud bot commented Jun 3, 2025

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
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
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