Fix/perps breakdown tips zero balance - #4143
Merged
Merged
Conversation
Contributor
PR扫描结果依赖变更无依赖变更 |
…ter symbol resolution
Contributor
PR扫描结果依赖变更无依赖变更 |
cs1707
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily removes the
hasNonPerpsPortfolioAssetsselector and its usages, simplifying the logic for showing the portfolio breakdown in the Perps account UI. Additionally, it improves the TradingView chart integration by ensuring the price precision (pxDecimals) is accurate before rendering, preventing axis reticking and enhancing user experience.UI Logic Simplification:
hasNonPerpsPortfolioAssetsselector and all related code and tests, so the portfolio breakdown is now shown based only on whether the headline value is greater than zero and user data is ready. (src/ui/views/Perps/utils/accountPricing.ts[1]src/ui/views/Perps/components/PerpsAccountCard.tsx[2] [3]__tests__/ui/perpsAccountPricing.test.ts[4] [5]TradingView Chart Improvements:
pxDecimalsReadyprop to the TradingView chart components to ensure the chart waits for price-derived precision before rendering, preventing visible axis reticking. (src/ui/views/DesktopPerps/components/ChartArea/components/ChartWrapper.tsx[1]src/ui/views/Perps/components/TradingViewIframeChart.tsx[2] [3] [4] [5] [6] [7]pxDecimalsis ready, with a 3-second upper bound to avoid indefinite waiting. (src/ui/views/Perps/components/TradingViewIframeChart.tsx[1] [2] [3] [4]These changes streamline the UI logic and provide a smoother charting experience for users.