Skip to content

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

Open
jmquero92 wants to merge 1 commit into
capofficial:mainfrom
jmquero92:main
Open

jmquero92 wants to merge 1 commit into
capofficial:mainfrom
jmquero92:main

Conversation

@jmquero92

Copy link
Copy Markdown

Fixes #19
/claim #19

Summary

Updates src/components/modals/EditMargin.svelte to display:

  • The user's available wallet balance ($balances[data.position.asset]) when Add margin is selected (clickable to fill max amount).
  • The available removable margin (Math.max(0, data.position.margin * 1 + funding * 1)) when Remove margin is selected (clickable to fill max amount).
  • Fetches latest asset balances on mount via getUserAssetBalances().

Payout Contact (PayPal): jm_kero92@hotmail.com

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.

Show available margin in Add/Remove margin modal

1 participant