Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-08 18:07:22 +02:00
parent 42816ea0be
commit 0d3745ebef
5 changed files with 102 additions and 15 deletions

View file

@ -0,0 +1,51 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="128dp"
android:height="128dp"
android:viewportWidth="128"
android:viewportHeight="128">
<path
android:pathData="M32,0L96,0A32,32 0,0 1,128 32L128,96A32,32 0,0 1,96 128L32,128A32,32 0,0 1,0 96L0,32A32,32 0,0 1,32 0z"
android:fillColor="#5232F3"/>
<path
android:pathData="M32,0L96,0A32,32 0,0 1,128 32L128,96A32,32 0,0 1,96 128L32,128A32,32 0,0 1,0 96L0,32A32,32 0,0 1,32 0z"
android:fillAlpha="0.2">
<aapt:attr name="android:fillColor">
<gradient
android:startX="64"
android:startY="0"
android:endX="64"
android:endY="128"
android:type="linear">
<item android:offset="0" android:color="#00FFFFFF"/>
<item android:offset="1" android:color="#FFFFFFFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M32,1L96,1A31,31 0,0 1,127 32L127,96A31,31 0,0 1,96 127L32,127A31,31 0,0 1,1 96L1,32A31,31 0,0 1,32 1z"
android:strokeAlpha="0.1"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#000000"/>
<path
android:pathData="M40.97,79.11H33L27.03,55.3C26.74,54.2 26.14,53.23 25.25,52.78C23.04,51.63 20.61,50.72 17.95,50.26V49.34H30.79C32.56,49.34 33.89,50.72 34.11,52.32L37.21,69.5L45.18,49.34H52.93L40.97,79.11ZM57.35,79.11H49.83L56.02,49.34H63.55L57.35,79.11ZM73.3,57.58C73.52,55.98 74.85,55.06 76.4,55.06C78.83,54.83 81.49,55.29 83.7,56.44L85.03,50.03C82.82,49.11 80.38,48.65 78.17,48.65C70.86,48.65 65.55,52.77 65.55,58.5C65.55,62.85 69.31,65.14 71.97,66.52C74.85,67.89 75.95,68.81 75.73,70.18C75.73,72.24 73.52,73.16 71.31,73.16C68.65,73.16 65.99,72.47 63.56,71.32L62.23,77.74C64.89,78.88 67.76,79.34 70.42,79.34C78.61,79.57 83.7,75.45 83.7,69.26C83.7,61.47 73.3,61.02 73.3,57.58ZM110.05,79.11L104.07,49.34H97.65C96.33,49.34 95,50.26 94.55,51.63L83.49,79.11H91.23L92.78,74.76H102.3L103.19,79.11H110.05ZM98.76,57.36L100.97,68.58H94.77L98.76,57.36Z"
android:fillColor="#ffffff"
android:fillAlpha="0.9"
android:fillType="evenOdd"/>
</vector>

View file

@ -24,7 +24,6 @@ import com.tangem.common.ui.earn.EarnBlockUM
import com.tangem.common.ui.expressStatus.state.ExpressTransactionStateUM
import com.tangem.common.ui.expressStatus.state.ExpressTransactionsBlockState
import com.tangem.common.ui.notifications.notifications
import com.tangem.core.ui.components.BottomFade
import com.tangem.core.ui.components.containers.pullToRefresh.PullToRefreshConfig
import com.tangem.core.ui.components.containers.pullToRefresh.TangemPullToRefreshSlidingContainer
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
@ -34,12 +33,13 @@ import com.tangem.core.ui.components.marketprice.MarketPriceBlockState
import com.tangem.core.ui.components.topFade
import com.tangem.core.ui.ds.button.TangemButtonType
import com.tangem.core.ui.ds.button.TangemButtonUM
import com.tangem.core.ui.ds2.fade.TangemFade
import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.extensions.themedColor
import com.tangem.core.ui.res.LocalHazeState
import com.tangem.core.ui.test.TokenDetailsScreenTestTags
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreviewRedesign
import com.tangem.core.ui.test.TokenDetailsScreenTestTags
import com.tangem.domain.models.account.CryptoPortfolioIcon
import com.tangem.feature.tokendetails.presentation.tokendetails.state.*
import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsTopAppBarUM.TitleState
@ -124,9 +124,13 @@ private fun BoxScope.TokenDetailsMarketBlockOverlay(
) {
val density = LocalDensity.current
BottomFade(
backgroundColor = TangemTheme.colors2.surface.level2,
modifier = Modifier.align(Alignment.BottomCenter),
TangemFade(
variant = TangemFade.Variant.Hard,
position = TangemFade.Position.Bottom,
modifier = Modifier
.fillMaxWidth()
.height(174.dp)
.align(Alignment.BottomCenter),
)
component.Content(

View file

@ -6,7 +6,6 @@ import com.tangem.core.analytics.models.AnalyticsParam
import com.tangem.core.decompose.di.ModelScoped
import com.tangem.domain.tangempay.TangemPayAnalyticsEvents
import com.tangem.feature.wallet.child.wallet.model.WalletActivationBannerType
import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnalyticsEvent.MainScreen
import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnalyticsEvent.MainScreen.*
import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnalyticsEvent.PushBannerPromo.PushBanner
import com.tangem.feature.wallet.presentation.wallet.state.model.*
@ -81,9 +80,9 @@ internal class WalletWarningsAnalyticsSender @Inject constructor(
-> null
is WalletNotification.FinishWalletActivation -> {
val activationState = if (warning.isBackupExists) {
MainScreen.NoticeFinishActivation.ActivationState.Unfinished
NoticeFinishActivation.ActivationState.Unfinished
} else {
MainScreen.NoticeFinishActivation.ActivationState.NotStarted
NoticeFinishActivation.ActivationState.NotStarted
}
val balanceState = when (warning.type) {
WalletActivationBannerType.Attention -> AnalyticsParam.EmptyFull.Empty
@ -135,6 +134,7 @@ internal class WalletWarningsAnalyticsSender @Inject constructor(
}
is WalletNotificationUM.PushNotifications -> PushBanner()
is WalletNotificationUM.AddFunds -> NoticeAddFunds()
is WalletNotificationUM.TangemPayPromo -> TangemPayAnalyticsEvents.PermanentBannerShowed()
is WalletNotificationUM.UnlockWallets,
is WalletNotificationUM.NoAccount,
is WalletNotificationUM.LowSignatures,

View file

@ -255,7 +255,10 @@ internal class GetWalletNotificationsFactory @Inject constructor(
onRefreshClick = { walletClickIntents.onRefreshPayToken(userWallet) },
shouldShowProgress = false,
)
is PaymentAccountStatusValue.NotCreated -> null // TODO(Main redesign) and analytics PermanentBannerShowed
is PaymentAccountStatusValue.NotCreated -> WalletNotificationUM.TangemPayPromo(
onLaterClick = { walletClickIntents.onOnboardingBannerCloseClick(userWallet.walletId) },
onLearnMoreClick = { walletClickIntents.onOnboardingBannerClick(userWallet.walletId) },
)
is PaymentAccountStatusValue.Error.Unavailable -> WalletNotificationUM.TangemPayUnreachable
is PaymentAccountStatusValue.Error.CardIssueFailed,
is PaymentAccountStatusValue.Error.ExposedDevice,

View file

@ -7,7 +7,10 @@ import com.tangem.core.ui.ds.image.TangemIconUM
import com.tangem.core.ui.ds.message.TangemMessageButtonUM
import com.tangem.core.ui.ds.message.TangemMessageEffect
import com.tangem.core.ui.ds.message.TangemMessageUM
import com.tangem.core.ui.extensions.*
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.pluralReference
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.wrappedList
import com.tangem.core.ui.res.TangemTheme
import com.tangem.feature.wallet.impl.R
import kotlinx.collections.immutable.persistentListOf
@ -52,8 +55,8 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
data object UsedOutdatedData : WalletNotificationUM(
messageUM = TangemMessageUM(
id = "UsedOutdatedDataNotification",
title = resourceReference(com.tangem.core.res.R.string.warning_outdated_data_title),
subtitle = resourceReference(com.tangem.core.res.R.string.warning_outdated_data_message),
title = resourceReference(R.string.warning_outdated_data_title),
subtitle = resourceReference(R.string.warning_outdated_data_message),
iconUM = TangemIconUM.Icon(
iconRes = R.drawable.ic_error_sync_default_24,
tintReference = { TangemTheme.colors2.graphic.status.attention },
@ -383,6 +386,32 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
type = WalletNotificationType.Promo,
)
data class TangemPayPromo(
private val onLaterClick: () -> Unit,
private val onLearnMoreClick: () -> Unit,
) : WalletNotificationUM(
messageUM = TangemMessageUM(
id = "TangemPayPromo",
iconUM = TangemIconUM.Image(imageRes = R.drawable.ic_visa_in_banner),
title = resourceReference(id = R.string.tangempay_onboarding_banner_title),
subtitle = resourceReference(id = R.string.tangempay_get_banner_description),
buttonsUM = persistentListOf(
TangemMessageButtonUM(
text = resourceReference(id = R.string.common_later),
onClick = onLaterClick,
type = TangemButtonType.Secondary,
),
TangemMessageButtonUM(
text = resourceReference(id = R.string.common_learn_more),
onClick = onLearnMoreClick,
type = TangemButtonType.Primary,
),
),
messageEffect = TangemMessageEffect.None,
),
type = WalletNotificationType.Promo,
)
// endregion
// region Survey
@ -448,8 +477,8 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
) : WalletNotificationUM(
messageUM = TangemMessageUM(
id = "CloreMigrationNotification",
title = resourceReference(com.tangem.core.res.R.string.warning_clore_migration_title),
subtitle = resourceReference(com.tangem.core.res.R.string.warning_clore_migration_description),
title = resourceReference(R.string.warning_clore_migration_title),
subtitle = resourceReference(R.string.warning_clore_migration_description),
iconUM = TangemIconUM.Icon(
iconRes = R.drawable.ic_attention_default_24,
tintReference = { TangemTheme.colors2.graphic.status.attention },
@ -457,7 +486,7 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
messageEffect = TangemMessageEffect.None,
buttonsUM = persistentListOf(
TangemMessageButtonUM(
text = resourceReference(com.tangem.core.res.R.string.warning_clore_migration_button),
text = resourceReference(R.string.warning_clore_migration_button),
onClick = onStartMigrationClick,
type = TangemButtonType.Secondary,
),