Skip to content
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

fix(swap): validate total liquidity for non dca quotes #1123

Closed
wants to merge 2 commits into from

Conversation

jerryafr
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.04%. Comparing base (6fbf232) to head (d418995).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1123   +/-   ##
=======================================
  Coverage   87.04%   87.04%           
=======================================
  Files         100      100           
  Lines        1351     1351           
  Branches      207      207           
=======================================
  Hits         1176     1176           
  Misses        166      166           
  Partials        9        9           
Flag Coverage Δ
sdk 96.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +264 to +267
} else if (quote) {
await validateLiquidity(quote.egressAmount, quote.intermediateAmount);
} else {
throw ServiceError.internalError('could not generate quotes');
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we should always do this for all of the quotes, no?

Suggested change
} else if (quote) {
await validateLiquidity(quote.egressAmount, quote.intermediateAmount);
} else {
throw ServiceError.internalError('could not generate quotes');
}
if (quote) {
await validateLiquidity(quote.egressAmount, quote.intermediateAmount);
}

@jerryafr jerryafr closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants