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

feat(limit-orders): allow partner fee (variant B) #4467

Merged
merged 31 commits into from
Jun 18, 2024

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented May 22, 2024

Summary

Specification: https://www.figma.com/design/OOPIbTemw8FS2jcGWRF87x/Limit-order-fee-options?node-id=0-1

This was an initial version of limit orders with partner fee, but after some discussion we decided to switch to variant A (see the specification).

I kept this PR because it contains some valuable refactoring, anyway, main changes are done in variant A.

Please ignore any changes in modules/limit-orders because they are reverted in variant A.

Refactoring

  1. Added a separate atom+hook for partner fee, to avoid excessive re-renders (commit)
  2. Removed data duplication from ReceiveAmountInfo and moved the interface to trade module (commit1 commit2)
  3. Cleaned up TradeRates component props (commit)
  4. Simplified RowFee component (commit)

The only valuable functional changes

getOrderAmountsWithPartnerFee() - this order takes partner fee into account for order amounts and the result is used in executes at price calculation (commit)

To Test

See #4502

Copy link

vercel bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Jun 18, 2024 5:23am
cowfi ✅ Ready (Inspect) Visit Preview Jun 18, 2024 5:23am
explorer-dev ✅ Ready (Inspect) Visit Preview Jun 18, 2024 5:23am
swap-dev ✅ Ready (Inspect) Visit Preview Jun 18, 2024 5:23am
widget-configurator ✅ Ready (Inspect) Visit Preview Jun 18, 2024 5:23am

… feat/limit-orders-partner-fee

# Conflicts:
#	apps/cowswap-frontend/src/modules/trade/index.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants