-
Notifications
You must be signed in to change notification settings - Fork 101
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: clear order selection on change tabs #5286
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.
Thanks!
(child.orderParams?.hasEnoughBalance === false || child.orderParams?.hasEnoughAllowance === false) && | ||
(child.order.status === OrderStatus.PENDING || child.order.status === OrderStatus.SCHEDULED), | ||
) | ||
: null |
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.
looks like there's repetition here. Isn't this the same as hasChildWithWarning
? so:
const hasChildWithWarning = !!childWithWarning
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.
The title of the PR made me thing the PR is smaller
// At least one part is open | ||
if (hasOpen) { | ||
return TwapOrderStatus.Pending | ||
} |
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.
I think this is right, but double checking that if I have
- P1: Filled
- P2: Pending
I want to show OPEN and not PARTIALLY_FILLED?
|
||
// Some filled + some expired/cancelled | ||
if (hasFilled && (hasExpired || hasCancelled)) { | ||
return TwapOrderStatus.Fulfilled // Partially filled is considered Fulfilled for display |
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.
Partially filled is considered Fulfilled for display
why, i didn't get this. This is not what we show in the explorer. I would think this is also not what we show in limit orders table
} | ||
|
||
// Mixed cancelled & expired only (no fills) | ||
if (hasCancelled && hasExpired && !hasFilled) { |
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.
why the hasExpired?
If we cancel and is not expired, we need to see Cancelled, no?
Regarding the design, imo, we should not put in the same column the status and the parts. Why not keeping them in separate columns? |
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 @fairlighteth , great, thank you!
As @anxolin suggests, I'd also split columns for parts and statuses displaying. At least. to avoid these issues (see the images):
Addressed in #5296 |
de27601
to
3b1038d
Compare
@fairlighteth consolidating to parent, please address @anxolin 's comments in a follow up PR |
Summary