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

Unify trade form state services #2417

Closed
shoom3301 opened this issue May 4, 2023 · 0 comments · Fixed by #2590, #2591 or #2592
Closed

Unify trade form state services #2417

shoom3301 opened this issue May 4, 2023 · 0 comments · Fixed by #2590, #2591 or #2592
Assignees
Labels

Comments

@shoom3301
Copy link
Collaborator

shoom3301 commented May 4, 2023

image

image

Currently, we have different implementations to solve the same task - the detection of a state of a trade widget.
What is the state of the trade widget:

  • WalletIsNotConnected
  • NotApproved
  • FeeExceedsFrom
  • etc.

Current implementations:

  • Limit orders: useLimitOrdersFormState + getLimitOrdersFormState
  • Swap: useSwapButtonContext + getSwapButtonState

We need to unify them, and extract common states to a new common service (it can be hook/jotai atom/function/updater etc.).

Requirements:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment