From 427715888d5e1c1763508f7b1629160ec7bdf76d Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 8 Jun 2026 18:11:18 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../features/tangempay/entity/TangemPayCardPageUM.kt | 1 - .../features/tangempay/entity/TangemPayDetailsUM.kt | 1 - .../tangempay/model/TangemPayCardPageModel.kt | 3 +-- .../DetailsAddToWalletBannerTransformer.kt | 1 - .../tangempay/ui/TangemPayAddToWalletBlock.kt | 12 ++++-------- .../features/tangempay/ui/TangemPayCardPageScreen.kt | 3 ++- .../tangempay/ui/TangemPayDailyLimitBlock.kt | 2 +- .../features/tangempay/ui/TangemPayDetailsScreen.kt | 1 - .../tangempay/ui/TangemPayReplacingCardBlock.kt | 3 ++- 9 files changed, 10 insertions(+), 17 deletions(-) diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayCardPageUM.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayCardPageUM.kt index 406e3c16e6..7b9757365a 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayCardPageUM.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayCardPageUM.kt @@ -25,7 +25,6 @@ internal data class TangemPayCardPageUM( addToWalletBlockState: AddToWalletBlockState? = AddToWalletBlockState( onClick = {}, onClickClose = {}, - shouldUseMagicEffect = false, ), settings: ImmutableList = persistentListOf( TangemPayCardPageSetting(TextReference.Str("Pin Code")) {}, diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayDetailsUM.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayDetailsUM.kt index 706d875d26..668988f260 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayDetailsUM.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/entity/TangemPayDetailsUM.kt @@ -97,5 +97,4 @@ internal sealed class TangemPayDetailsBalanceBlockState { internal data class AddToWalletBlockState( val onClick: () -> Unit, val onClickClose: () -> Unit, - val shouldUseMagicEffect: Boolean, ) \ No newline at end of file diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/TangemPayCardPageModel.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/TangemPayCardPageModel.kt index cfdd4ebb6f..9acc3c9982 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/TangemPayCardPageModel.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/TangemPayCardPageModel.kt @@ -37,8 +37,8 @@ import com.tangem.domain.pay.repository.TangemPayCardDetailsRepository import com.tangem.domain.pay.usecase.ChangeCardFrozenStateUseCase import com.tangem.domain.tangempay.TangemPayAnalyticsEvents import com.tangem.features.tangempay.TangemPayFeatureToggles -import com.tangem.features.tangempay.components.AddFundsListener import com.tangem.features.tangempay.closure.CloseCardListener +import com.tangem.features.tangempay.components.AddFundsListener import com.tangem.features.tangempay.components.ReissueCardListener import com.tangem.features.tangempay.components.TangemPayCardPageComponent import com.tangem.features.tangempay.components.ViewPinListener @@ -421,7 +421,6 @@ internal class TangemPayCardPageModel @Inject constructor( addToWalletBlockState = AddToWalletBlockState( onClick = ::onClickAddToWallet, onClickClose = ::onClickCloseBanner, - shouldUseMagicEffect = false, ), ) } diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/transformers/DetailsAddToWalletBannerTransformer.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/transformers/DetailsAddToWalletBannerTransformer.kt index a1ba351878..ba03d8c6ab 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/transformers/DetailsAddToWalletBannerTransformer.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/model/transformers/DetailsAddToWalletBannerTransformer.kt @@ -18,7 +18,6 @@ internal class DetailsAddToWalletBannerTransformer( AddToWalletBlockState( onClick = onClickBanner, onClickClose = onClickCloseBanner, - shouldUseMagicEffect = true, ) }, ) diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayAddToWalletBlock.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayAddToWalletBlock.kt index 97319e8e05..b5b3374ac7 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayAddToWalletBlock.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayAddToWalletBlock.kt @@ -45,7 +45,7 @@ internal fun TangemPayAddToWalletBlock(state: AddToWalletBlockState, modifier: M } @Composable -internal fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier: Modifier = Modifier) { +private fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier: Modifier = Modifier) { Box( modifier = modifier .fillMaxWidth() @@ -114,17 +114,13 @@ internal fun TangemPayAddToWalletBlockV1(state: AddToWalletBlockState, modifier: } @Composable -internal fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier: Modifier = Modifier) { +private fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier: Modifier = Modifier) { TangemMessage( modifier = modifier.clickableSingle(onClick = state.onClick), onCloseClick = state.onClickClose, title = resourceReference(R.string.tangempay_card_details_open_wallet_notification_title), subtitle = resourceReference(R.string.tangempay_card_details_open_wallet_notification_subtitle), - messageEffect = if (state.shouldUseMagicEffect) { - TangemMessageEffect.Magic - } else { - TangemMessageEffect.None - }, + messageEffect = TangemMessageEffect.Magic, ) } @@ -133,6 +129,6 @@ internal fun TangemPayAddToWalletBlockV2(state: AddToWalletBlockState, modifier: @Composable private fun PreviewTangemPayAddToWalletBlock() { TangemThemePreview { - TangemPayAddToWalletBlock(AddToWalletBlockState(onClick = {}, onClickClose = {}, shouldUseMagicEffect = false)) + TangemPayAddToWalletBlock(AddToWalletBlockState(onClick = {}, onClickClose = {})) } } \ No newline at end of file diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayCardPageScreen.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayCardPageScreen.kt index 6bb50a2d87..065b3d015f 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayCardPageScreen.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayCardPageScreen.kt @@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.testTag import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp import androidx.compose.ui.util.fastForEach import com.tangem.core.ui.components.appbar.AppBarWithBackButton import com.tangem.core.ui.ds.image.TangemIconUM @@ -76,7 +77,7 @@ internal fun TangemPayCardPageScreen( end = TangemTheme.dimens.spacing16, bottom = TangemTheme.dimens.spacing16 + bottomBarHeight, ), - verticalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing16), + verticalArrangement = Arrangement.spacedBy(if (isRedesignEnabled) 0.dp else TangemTheme.dimens.spacing16), ) { item(key = "Card") { cardDetailsBlockComponent.CardDetailsBlockContent( diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDailyLimitBlock.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDailyLimitBlock.kt index a9a05727a1..141a870b0c 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDailyLimitBlock.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDailyLimitBlock.kt @@ -38,7 +38,7 @@ import com.tangem.features.tangempay.entity.TangemPayDailyLimitBlockState @Composable internal fun TangemPayDailyLimitBlock(state: TangemPayDailyLimitBlockState, modifier: Modifier = Modifier) { if (LocalVisaRedesignEnabled.current) { - CurrentLimitBlockV2(state, modifier) + CurrentLimitBlockV2(state, modifier.padding(top = TangemTheme.dimens2.x2)) } else { TangemPayDailyLimitBlockV1(state, modifier) } diff --git a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDetailsScreen.kt b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDetailsScreen.kt index 3371d0dcdb..51e11080b3 100644 --- a/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDetailsScreen.kt +++ b/features/tangempay/details/impl/src/main/kotlin/com/tangem/features/tangempay/ui/TangemPayDetailsScreen.kt @@ -471,7 +471,6 @@ internal class TangemPayDetailsUMProvider : CollectionPreviewParameterProvider