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: release correct amount of underlying in loans.redeem #930

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

sander2
Copy link
Member

@sander2 sander2 commented Feb 14, 2023

This fixes an issue where I called loans.redeem with 1e8 as amount, but only 1e8 - 1 actually got released. This was due to the amount first being converted to the lend_token_id and then back to the underlying. The change is that we now only do one conversion: in loans.redeem we do only a single to_lend_id, while in loans.redeem_all we do only a single to_underlying_id.

Closes #929

@sander2 sander2 marked this pull request as ready for review February 15, 2023 15:56
@sander2 sander2 merged commit d0a1c2d into interlay:master Feb 16, 2023
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.

Loans: redeem not releasing correct amount due to rounding
2 participants