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

enhance order categorization and warning handling in OrdersTableWidget #5320

Merged
merged 40 commits into from
Jan 24, 2025

Conversation

fairlighteth
Copy link
Contributor

refactor: enhance order categorization and warning handling in OrdersTableWidget

  • Improved the logic for categorizing orders into pending, history, unfillable, signing, and all lists.
  • Updated the handling of unfillable orders to check for child orders in TWAP scenarios.
  • Refined the warning display logic for child orders based on balance and allowance checks.
  • Ensured that the order display reflects the correct state based on child order statuses and parameters.
Screenshot 2025-01-21 at 15 04 11 Screenshot 2025-01-21 at 15 04 21 Screenshot 2025-01-21 at 15 04 34 Screenshot 2025-01-21 at 15 04 46

fairlighteth and others added 29 commits January 16, 2025 16:10
* feat: hide orders table widget

* feat: hide orders table widget for limit and twap
…col/cowswap into feat/limit-ui-upgrade-15

# Conflicts:
#	apps/cowswap-frontend/src/common/updaters/orders/SpotPricesUpdater.ts
…l/cowswap into feat/limit-ui-upgrade-15

# Conflicts:
#	apps/cowswap-frontend/src/common/updaters/orders/SpotPricesUpdater.ts
Copy link

vercel bot commented Jan 21, 2025

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

Name Status Preview Updated (UTC)
cowfi ✅ Ready (Inspect) Visit Preview Jan 23, 2025 5:51pm
explorer-dev ✅ Ready (Inspect) Visit Preview Jan 23, 2025 5:51pm
swap-dev ✅ Ready (Inspect) Visit Preview Jan 23, 2025 5:51pm
3 Skipped Deployments
Name Status Preview Updated (UTC)
cosmos ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 5:51pm
sdk-tools ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 5:51pm
widget-configurator ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 5:51pm

(childOrder) =>
childOrder.status !== OrderStatus.FULFILLED &&
(childOrder.status === OrderStatus.SCHEDULED || childOrder.status === OrderStatus.PENDING) &&
(getOrderParams(chainId, balancesAndAllowances, childOrder)?.hasEnoughBalance === false ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOrderParams is called twice here, should be cached to a const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be addressed now.

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fairlighteth , Thank you!

There is 1 nitpick:

  1. I place a TWAP order where I bundle 'Approve+Place order' transaction
  2. After 'Singing' state, the parent order blinks with 'Order filled' status

Could you please take a look a this issue?

@elena-zh elena-zh self-requested a review January 22, 2025 12:55
Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thig that I've noticed: now Unfillable orders are not displayed in the Open tab.
image
Reported it here as a separate task, but the issue is related to this PR only.

…l/cowswap into feat/limit-ui-upgrade-16

# Conflicts:
#	apps/cowswap-frontend/src/modules/ordersTable/pure/OrdersTableContainer/OrderRow/index.tsx
@fairlighteth
Copy link
Contributor Author

One more thig that I've noticed: now Unfillable orders are not displayed in the Open tab. image Reported it here as a separate task, but the issue is related to this PR only.

Should be fixed in this PR now.

@fairlighteth
Copy link
Contributor Author

@fairlighteth , Thank you!

There is 1 nitpick:

1. I place a TWAP order where I bundle 'Approve+Place order' transaction

2. After 'Singing' state, the parent order blinks with 'Order filled' status

Could you please take a look a this issue?

I could not quickly replicate this. I would propose to address this in a separate PR.

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base automatically changed from feat/limit-ui-upgrade-16 to feat/limit-ui-upgrade January 23, 2025 12:37
@shoom3301 shoom3301 merged commit f33d7ce into feat/limit-ui-upgrade Jan 24, 2025
12 of 13 checks passed
@shoom3301 shoom3301 deleted the feat/limit-ui-upgrade-17 branch January 24, 2025 05:43
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2025
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.

4 participants