Skip to content

Show current and new liquidation price in edit margin modal#161

Open
rebel117 wants to merge 1 commit into
capofficial:mainfrom
rebel117:fix-4-show-liquidation-price
Open

Show current and new liquidation price in edit margin modal#161
rebel117 wants to merge 1 commit into
capofficial:mainfrom
rebel117:fix-4-show-liquidation-price

Conversation

@rebel117
Copy link
Copy Markdown

Problem

When adding or removing margin, users could only see the new liquidation price but not the current one, making it hard to understand the impact of the margin change.

Solution

Added a "Current Liq. Price" row above the existing "New Liq. Price" row in the EditMargin modal, so both values are visible side by side for comparison.

Changes

  • src/components/modals/EditMargin.svelte: Added currentLiqPrice variable initialized from data.position.liqprice and a new LabelValue row displaying it

Testing

  • The current liquidation price is displayed when the modal opens
  • The new liquidation price updates dynamically as the user types a margin amount
  • Both prices use the existing formatForDisplay formatter for consistent formatting

Closes #4

Display the current liquidation price alongside the new calculated
price when adding or removing margin, so users can see the impact
of their margin adjustment at a glance.
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.

Show new liquidation price when adding or removing margin

1 participant