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: stableswap asset order #636

Merged
merged 3 commits into from
Jul 7, 2023
Merged

Conversation

enthusiastmartin
Copy link
Contributor

There is a little bug in sell functionality where the order are flipped as input to calculate_out_amount function.

This works ok (ish) for pools where assets have all the same decimals but becomes more obvious where there is one with different number of decimals. Hence spotted quite late.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Crate versions that have been updated:

  • hydra-dx-math: v7.4.1 -> v7.4.2
  • pallet-stableswap: v2.1.0 -> v2.1.1

Runtime version has not been increased.

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (34e5951) 65.19% compared to head (b5e5826) 65.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #636   +/-   ##
=======================================
  Coverage   65.19%   65.19%           
=======================================
  Files         131      131           
  Lines        9655     9655           
=======================================
  Hits         6295     6295           
  Misses       3360     3360           
Impacted Files Coverage Δ
pallets/stableswap/src/lib.rs 85.66% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@enthusiastmartin enthusiastmartin merged commit ed714e5 into master Jul 7, 2023
8 checks passed
@enthusiastmartin enthusiastmartin deleted the fix/stableswap-asset-order branch July 8, 2023 06:41
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.

2 participants