Skip to content

feat: show available wallet balance and max removable margin in EditMargin (#19) - #284

Open
fei36bot wants to merge 1 commit into
capofficial:mainfrom
fei36bot:feat/issue-19-show-available-margin-fei36bot
Open

fei36bot wants to merge 1 commit into
capofficial:mainfrom
fei36bot:feat/issue-19-show-available-margin-fei36bot

Conversation

@fei36bot

@fei36bot fei36bot commented Nov 3, 2026

Copy link
Copy Markdown

Summary

Resolves #19 ($50 bounty): show available margin in Add/Remove Margin modal.

Changes (src/components/modals/EditMargin.svelte)

  • Add mode: fetch balances via getUserAssetBalances(), show clickable Available (wallet balance for position asset)
  • Remove mode: compute maxRemovableMargin from maxLeverage, funding, and negative UPL; show clickable Max Removable
  • Clicking Available / Max Removable autofills the margin input
  • Safer leverage calc when newMargin is 0

Hosted mirror

https://telegra.ph/capofficialclient19-Deliverable-10-27-2

Requesting assignment/consideration for the bounty.

…argin (capofficial#19)

- Add margin: display clickable Available from getUserAssetBalances/balances
- Remove margin: compute maxRemovableMargin from maxLeverage, funding, UPL
- Click Available/Max Removable to autofill the input

This branch has not been deployed

No deployments
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.

1 participant