-
Notifications
You must be signed in to change notification settings - Fork 108
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(limit-orders): don't override price from URL with initial value #4668
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Hey @shoom3301 , might this be possible to implement another logic for saving Sell amount only when navigating between forms?
Currently, I see different behaviors when:
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.
Code looks good.
Has this been tested with recreate orders as well?
This change might affect that.
@anxolin about the comment from Elena: #4668 (review) I consider it as an enhancement and think we should keep it as it is. Before we used to have this behaviour:
In this PR:
Why I think it's better. |
@alfetopito , this does not affect recreate orders feature. |
I personally like this behavior way more. It feels way more natural to me Not sure if the friction of Elena is related to maybe the [Market price] button should give us the price of the SWAP (as market order swap) and not the market price (as the mid-point price). I don't know what is best for this button, but I'd be happy to merge the logic as suggested in this PR and maybe some other time in UX sessions we check if this button should behave one way or the other. |
Sorry for this super slow response @elena-zh ! I don't think we need to make LIMIT order to have the same as SWAP, we need to make a nice transition from where we were. In this case we keep the buy amount constant. This is useful, cause in the case of
|
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.
@anxolin , thank you for your reply!
Approving.
Could you please merge this PR into develop then?
Summary
Fixes #4666
In limit orders we have initial price which is a value derrived from
/native_price
API.Recently I added
SetupLimitOrderAmountsFromUrlUpdater
which fills limit-orders state with amounts from URL.Those two mechanisms were conflicting and it caused from price values.
After this fix:
To Test