Updated on 2026-08-14

This commit is contained in:
Tangem 2024-08-26 13:14:53 +03:00
commit 43c376489a
316 changed files with 7586 additions and 3131 deletions

View file

@ -1,21 +0,0 @@
package com.tangem.feature.swap.di
import com.tangem.core.featuretoggle.manager.FeatureTogglesManager
import com.tangem.feature.swap.api.SwapFeatureToggleManager
import com.tangem.feature.swap.toggles.DefaultFeatureTogglesManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityRetainedComponent
import dagger.hilt.android.scopes.ActivityRetainedScoped
@Module
@InstallIn(ActivityRetainedComponent::class)
internal object SwapFeatureTogglesManagerModule {
@Provides
@ActivityRetainedScoped
fun provideSwapFeatureTogglesManager(featureTogglesManager: FeatureTogglesManager): SwapFeatureToggleManager {
return DefaultFeatureTogglesManager(featureTogglesManager)
}
}

View file

@ -1,12 +0,0 @@
package com.tangem.feature.swap.toggles
import com.tangem.core.featuretoggle.manager.FeatureTogglesManager
/** Feature toggles manager implementation of "swap" feature */
class DefaultFeatureTogglesManager(
private val featureTogglesManager: FeatureTogglesManager,
) : InnerSwapFeatureTogglesManager {
override val isOptimismSwapEnabled: Boolean
get() = featureTogglesManager.isFeatureEnabled(name = "OPTIMISM_SWAP_FEATURE_ENABLED")
}

View file

@ -1,6 +0,0 @@
package com.tangem.feature.swap.toggles
import com.tangem.feature.swap.api.SwapFeatureToggleManager
/** Feature toggles manager of "swap" feature for internal logic */
internal interface InnerSwapFeatureTogglesManager : SwapFeatureToggleManager

View file

@ -363,8 +363,8 @@ internal class StateBuilder(
if (quoteModel.permissionState is PermissionDataState.PermissionLoading) {
warnings.add(
SwapWarning.TransactionInProgressWarning(
title = resourceReference(R.string.warning_express_approval_in_progress_title),
description = resourceReference(R.string.warning_express_approval_in_progress_message),
title = stringReference("//TODO"),
description = stringReference("//TODO"),
),
)
} else if (quoteModel.preparedSwapConfigState.hasOutgoingTransaction) {
@ -996,8 +996,8 @@ internal class StateBuilder(
warnings.add(
0,
SwapWarning.TransactionInProgressWarning(
title = resourceReference(R.string.warning_express_approval_in_progress_title),
description = resourceReference(R.string.warning_express_approval_in_progress_message),
title = stringReference("//TODO"),
description = stringReference("//TODO"),
),
)
return uiState.copy(

View file

@ -110,7 +110,7 @@ internal fun SwapScreenContent(state: SwapStateHolder, modifier: Modifier = Modi
BasicDialog(
title = state.alert.title?.resolveReference(),
message = message,
confirmButton = DialogButton(
confirmButton = DialogButtonUM(
title = stringResource(id = R.string.common_ok),
onClick = state.alert.onClick,
),