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

chore(isolatedMargin): update account info #910

Conversation

moo-onthelawn
Copy link
Contributor

@moo-onthelawn moo-onthelawn commented Aug 12, 2024

On Portfolio Page:

  • Rename Cross Free CollateralAvailable Balance

On Account Info Panel (Trade Page):

  • Replace Cross Margin Usage with Portfolio Value
  • Rename Cross Free Collateral -> Available Balance and add cross margin icon next to it (with tooltip of “Percentage of your total cross margin used by open positions.”)
Normal State Trade State Trade State w/ Errors
Screenshot 2024-08-12 at 11 12 21 AM Screenshot 2024-08-12 at 5 30 38 PM Screenshot 2024-08-12 at 5 30 47 PM

Views

  • portfolio/AccountDetailsAndHistory

    • Rename Free Collateral to Available Balance and update variable names
  • AccountInfo/AccountInfoConnectedState

    • Replace MarginUsage -> PortfolioValue and BuyingPower -> AvailableBalance
    • Update hasDiff logic to check portfolioValue and availableBalance
    • Update error states on PortfolioValue and AvailableBalance to check if they're negative
    • Move crossMargin icon to be next to available balance with tooltip around it

Copy link

vercel bot commented Aug 12, 2024

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

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:30pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:30pm

Copy link

linear bot commented Aug 12, 2024

@moo-onthelawn moo-onthelawn changed the title chore(isolatedMargin): update account info chore(isolatedMargin): update account info Aug 12, 2024
@tyleroooo
Copy link
Contributor

Why is equity going down when you are purchasing ETH?

Why do we show equity when it should stay the same when you buy/sell?

@moo-onthelawn
Copy link
Contributor Author

moo-onthelawn commented Aug 12, 2024

Why is equity going down when you are purchasing ETH?

ah good point, hm currently it's going down because we're just looking at subaccount.equity, which in abacus is just doing a diff calculation based on how much you're spending to buy something (and not accounting for the value of the asset)

Why do we show equity when it should stay the same when you buy/sell?

related to above, we should probably not show a diff at all (it should just stay the same) - wil double check with se and then make the change!

@moo-onthelawn moo-onthelawn merged commit 8e446a9 into main Aug 13, 2024
7 checks passed
@moo-onthelawn moo-onthelawn deleted the mulan/ct-1108-update-strings-and-add-icon-to-available-balance branch August 13, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants