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

Fix TWAP and Limit Order Status Display #5305

Open
wants to merge 12 commits into
base: feat/limit-ui-upgrade-2
Choose a base branch
from

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Jan 16, 2025

Fix TWAP and Limit Order Status Display

This PR improves how order statuses are displayed in the "fills at" column for both TWAP parent orders and limit orders.

Changes

TWAP Parent Orders

  • Added status display for when all child orders are expired
  • Fixed status display logic to show:
    • "Order filled" when all child orders are 100% filled
    • "Order partially filled" when all child orders have some fills
    • "Order cancelled" when all child orders are cancelled
    • "Order expired" when all child orders are expired

Limit Orders

  • Fixed status precedence in the "fills at" column and status box:
    1. CANCELLED (takes precedence as final state)
    2. EXPIRED (final state)
    3. FILLED/PARTIALLY FILLED (execution state)
  • A cancelled order will now always show:
    • "Order cancelled" in both the "fills at" column and status box
    • The fill percentage bar still shows how much was filled before cancellation for historical context

Testing

Verified display for various order states:

  • TWAP parent orders with all children expired
  • TWAP parent orders with mixed child states
  • Limit orders cancelled after partial fills
  • Limit orders with various fill percentages

Visual Examples

  • A cancelled limit order with 89.85% fills shows:
    • "Order cancelled" in both the "fills at" column and status box
    • 89.85% in the progress bar to show historical fill amount
Screenshot 2025-01-16 at 17 41 32 Screenshot 2025-01-16 at 17 13 22 Screenshot 2025-01-16 at 17 11 45 Screenshot 2025-01-16 at 17 46 26

Copy link

vercel bot commented Jan 16, 2025

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

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

@fairlighteth fairlighteth requested review from a team January 16, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants