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

Reusable trade quote service #2416

Closed
shoom3301 opened this issue May 4, 2023 · 0 comments · Fixed by #2544
Closed

Reusable trade quote service #2416

shoom3301 opened this issue May 4, 2023 · 0 comments · Fixed by #2544
Assignees
Labels

Comments

@shoom3301
Copy link
Collaborator

shoom3301 commented May 4, 2023

To avoid duplication of code and logic between different trade widgets (swap/limit orders/advanced orders), we need to abstract quoting service.
Currently, we have implementations for:

  • limit orders: useFetchMarketPrice + limitOrdersQuoteAtom
  • swap: useGetQuoteAndStatus + state.price.quotes

And we need to add the same logic to a new widget - Advanced orders.

Requirements:

  • a new approach should provide a jotai atom with quote data that can be used in any trade widget
  • the atom should be filled in depending on the current trade widget type useTradeTypeInfo or useTradeState
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 a pull request may close this issue.

2 participants