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): Buy value recalculation race condition #2685

Merged
merged 3 commits into from
Sep 14, 2023
Merged

Conversation

jorbuedo
Copy link
Contributor

related: https://emurgo.atlassian.net/browse/YOMO-762

I don't love the solution, not sure if it may break for slow connection either.
Problem is recalculation of fields happens in the form, instead of in the swap package.

When buyTokenInfo?.id changes, I want to recalculate its value based on the sell quantity. But when running immediately, the createOrder values are not yet updated to do the calculation.

@jorbuedo jorbuedo added help wanted Extra attention is needed fix labels Sep 13, 2023
@jorbuedo jorbuedo self-assigned this Sep 13, 2023
@jorbuedo jorbuedo removed the help wanted Extra attention is needed label Sep 14, 2023
@stackchain stackchain merged commit 095a34c into develop Sep 14, 2023
2 checks passed
@stackchain stackchain deleted the yomo-762 branch September 14, 2023 10:04
@stackchain stackchain added this to the 5.0.0 milestone Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants