-
Notifications
You must be signed in to change notification settings - Fork 50
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
feature: Swap/change logic when user is picking the same asset #2898
Conversation
if (id === orderData.amounts.sell.tokenId && isSellTouched) { | ||
resetQuantities() | ||
switchTokens() | ||
} | ||
if (shouldUpdateToken) { | ||
buyTokenInfoChanged({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to call buyTokenInfoChanged
after we call switchTokens
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, do we need to resetQuantities? I thought it was just switch them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yap, otomh switchtokens instead of setting will do the job, can we make a variable more descriptive? Smth like shouldSwithTokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorbuedo as described in the design when the user is picking the same assets the inputs will be reset
task: https://emurgo.atlassian.net/browse/YOMO-959