Consolidate Android perps#313
Draft
gemdev111 wants to merge 7 commits into
Draft
Conversation
Adjust ValidateBalanceImpl to treat TransactionType.PerpetualModifyPosition as an amount-based case (returns amount) and move TransactionType.SmartContractCall to the TODO branch. In SelectLeverageDialog, add a localized title to ModalBottomSheet using stringResource(R.string.perpetual_leverage) and import the required resources. Changes improve balance validation mapping and add a proper title for the leverage dialog.
Introduce domain types and helpers for perpetual leverage (PerpetualLeverage.kt: default, options, formatLeverage, getLeverage) and a LeverageState data class. Replace scattered leverage constants with the domain default and options, remove obsolete companion constants in UserConfig, and wire domain helpers across the app: SettingsViewModel, UserConfig, PreferencesScene, transfer amount provider, dialogs and components. AmountPerpetualProvider now exposes a LeverageState (current/options/direction) computed from perpetual data, user selection and user preference, and UI shows formatted leverage with color based on direction. Also move PerpetualDirectionValue into the ui.components.perpetual package.
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.
No description provided.