Skip to content

Show available balance/margin in Edit Margin modal#230

Closed
qwertyplop wants to merge 1 commit into
capofficial:mainfrom
qwertyplop:feature/show-available-margin
Closed

Show available balance/margin in Edit Margin modal#230
qwertyplop wants to merge 1 commit into
capofficial:mainfrom
qwertyplop:feature/show-available-margin

Conversation

@qwertyplop
Copy link
Copy Markdown

Closes #19

Summary

When editing position margin, show relevant available amounts:

  • Add mode: display user's wallet balance for the asset
  • Remove mode: display current position margin available to withdraw

Implementation

  • Imported balances store (already exists in the codebase)
  • Imported numberWithCommas formatter (already used in Deposit/AssetSelect)
  • Added a .balance-row display element between the input and liquidation info
  • Follows the exact same pattern as Deposit.svelte's available balance display

Bounty

This work is submitted for the $50 crypto bounty as claimed.
Payment wallet: 0x6218e54e7737aC0FbEFA22B9E7E802AE2c1B204E (Ethereum)

When 'Add' is selected: display user's wallet balance for the asset.
When 'Remove' is selected: display current position margin as available.
Uses existing balances store - same pattern as Deposit.svelte.

Closes capofficial#19
@qwertyplop
Copy link
Copy Markdown
Author

Closing - repo appears inactive (last merge Oct 2023). Will pursue other opportunities.

@qwertyplop qwertyplop closed this May 26, 2026
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 available margin in Add/Remove margin modal

1 participant