[go: nahoru, domu]

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

chore: Remove SellAmount::AfterFee enum #2589

Open
sunce86 opened this issue Apr 2, 2024 · 3 comments
Open

chore: Remove SellAmount::AfterFee enum #2589

sunce86 opened this issue Apr 2, 2024 · 3 comments

Comments

@sunce86
Copy link
Contributor
sunce86 commented Apr 2, 2024

Background

https://github.com/cowprotocol/services/blob/main/crates/model/src/quote.rs#L257-L268

AFAIU the point of this enum is to differentiate between (legacy) market and limit orders quote requests.
Now that we killed legacy market orders, we should also clean this up and remove enum.

I personally find it very hard to understand quotes with this enum, as it is complicated to deduct how the values are propagated throughout the codebase.

@fleupold
Copy link
Contributor

I agree that with all orders being limit orders this enum makes less sense (since the fee that is being returned is not guaranteed, so you may end up selling a bit more or less in the end), but I don't think it's worth the effort to remove it. This would require a breaking API change which I think should be held off for a v2 of the API (potentially in combination with a new settlement contract).

@sunce86
Copy link
Contributor Author
sunce86 commented Apr 24, 2024

We can keep it in API only, while removing from all the internal code (for code clarity).

Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

@github-actions github-actions bot added the stale label Jun 24, 2024
@github-actions github-actions bot closed this as completed Jul 2, 2024
@fleupold fleupold reopened this Jul 2, 2024
@mfw78 mfw78 removed the stale label Jul 10, 2024
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

No branches or pull requests

3 participants