Updated on 2026-08-14
This commit is contained in:
parent
a5914f689f
commit
fcbdca43f4
2 changed files with 7 additions and 13 deletions
|
|
@ -102,7 +102,6 @@ internal class SwapViewModel @Inject constructor(
|
|||
get() = if (walletFeatureToggles.isMainActionButtonsEnabled) {
|
||||
savedStateHandle.get<Bundle>(AppRoute.Swap.CURRENCY_TO_KEY)
|
||||
?.unbundle(CryptoCurrency.serializer())
|
||||
?: error("no expected parameter CryptoCurrency (to) found")
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
|
@ -172,8 +171,7 @@ internal class SwapViewModel @Inject constructor(
|
|||
val fromStatus = getCryptoCurrencyStatusUseCase(userWalletId, initialCurrencyFrom.id).getOrNull()
|
||||
val toStatus = initialCurrencyTo?.let { getCryptoCurrencyStatusUseCase(userWalletId, it.id).getOrNull() }
|
||||
val wallet = getUserWalletUseCase(userWalletId).getOrNull()
|
||||
val isStatusToNull = walletFeatureToggles.isMainActionButtonsEnabled && toStatus == null
|
||||
if (fromStatus == null || wallet == null || isStatusToNull) {
|
||||
if (fromStatus == null || wallet == null) {
|
||||
uiState = stateBuilder.addAlert(uiState = uiState, onDismiss = swapRouter::back)
|
||||
} else {
|
||||
userWallet = wallet
|
||||
|
|
@ -228,15 +226,11 @@ internal class SwapViewModel @Inject constructor(
|
|||
swapInteractor.getTokensDataState(initialCurrencyFrom)
|
||||
}.onSuccess { state ->
|
||||
updateTokensState(state)
|
||||
val selectedCurrency = if (walletFeatureToggles.isMainActionButtonsEnabled) {
|
||||
initialToStatus
|
||||
} else {
|
||||
swapInteractor.getInitialCurrencyToSwap(
|
||||
val selectedCurrency = initialToStatus ?: swapInteractor.getInitialCurrencyToSwap(
|
||||
initialCryptoCurrency = initialCurrencyFrom,
|
||||
state = state,
|
||||
isReverseFromTo = isReverseFromTo,
|
||||
)
|
||||
}
|
||||
|
||||
applyInitialTokenChoice(
|
||||
state = state,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.tangem.plugin.configuration.model
|
|||
internal object AppConfig {
|
||||
const val packageName = "com.tangem.wallet"
|
||||
const val versionCode = 1
|
||||
const val versionName = "5.19.0-SNAPSHOT"
|
||||
const val versionName = "1.0.0-SNAPSHOT"
|
||||
// const val versionName = "100.0.0-SNAPSHOT" //TODO: [REDACTED_JIRA]
|
||||
const val minSdkVersion = 24
|
||||
const val targetSdkVersion = 34
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue