Merged
Conversation
Introduce new portfolio data models and types used by the portfolio feature: PortfolioChartData, PortfolioData, PortfolioStatistic (sealed enum variants), PortfolioMarginUsage and PortfolioType in Kotlin. Rename PerpetualPortfolioChartType to PortfolioChartType on Android. In Swift, add Equatable/Hashable conformances to ChartPeriod, PortfolioChartType, PortfolioChartData, PortfolioStatistic and PortfolioType and make PortfolioData Equatable so these types can be used in sets/dictionaries and compared. Remove the "inviteExisting" case from RewardEventType and update the core submodule reference.
Relocate the PortfolioType segmented Picker from the view body into the navigation toolbar (principal placement) and remove the enclosing VStack so ChartListView becomes the root content. Also make the navigation title conditional (empty when the segmented control is shown) to avoid duplicate/overlapping UI. Changes apply to PortfolioScene.swift and PortfolioSceneViewModel.swift.
DRadmir
requested changes
Apr 16, 2026
| import Primitives | ||
| import PriceService | ||
|
|
||
| public enum PortfolioRequest: Sendable { |
Contributor
There was a problem hiding this comment.
Could you rethink the name? *Request might be a bit misleading
| self.priceService = priceService | ||
| } | ||
|
|
||
| func getData(request: PortfolioRequest) async throws -> PortfolioData { |
Contributor
There was a problem hiding this comment.
check the protection level, the service is public but the method is internal
| } | ||
| } | ||
|
|
||
| public enum PortfolioStatistic: Codable, Equatable, Hashable, Sendable { |
Contributor
Author
There was a problem hiding this comment.
typeshare always derives Codable from serde - that is core
Rename the portfolio request type and update related APIs for clarity. Changes: PortfolioRequest -> PortfolioDataInput; PortfolioDataService.getData(request:) renamed to getPortfoliData(input:) and made public; internal helpers walletData -> getWalletData and perpetualData -> getPerpetualData. PortfolioSceneViewModel updated to call the new service API and renamed getPortfolioRequest() to getDataInput(). A straightforward refactor to align naming between service and view model.
DRadmir
approved these changes
Apr 16, 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.
Merge the separate portfolio and perpetual portfolio scenes into a single unified
PortfolioScene, with a segmented control in the navigation toolbar to switch between wallet and perpetual views.PortfolioChartData,PortfolioData,PortfolioStatistic,PortfolioMarginUsage,PortfolioType) in core, Kotlin, and SwiftWalletPortfolioScene/PerpetualPortfolioScenewith onePortfolioScene+PortfolioSceneViewModelandPortfolioDataServicePortfolioTypepicker into the navigation toolbar (principal placement) and drop the outerVStackEquatable/Hashableconformances across portfolio types; renamePerpetualPortfolioChartType→PortfolioChartTypePerpetualPortfolioScene+ its view model and tests; addPortfolioSceneViewModeltests and TestKit helpersinviteExistingRewardEventTypecase; bump core submoduleimages:
Close: #136