From 49aede77dc6c756847733e7a93d629004965179e Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 3 Jul 2026 09:17:57 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../ui/OnrampAddToPortfolioContent.kt | 6 +- .../TonInitializeAccountBottomSheetConfig.kt | 1 + ...ShowTonInitializeBottomSheetTransformer.kt | 1 + .../TonInitializeAccountBottomSheet.kt | 32 +++++++---- .../tokendetails/model/TokenDetailsModel.kt | 56 ++++++------------- .../UpdateNotificationsTransformer.kt | 12 ++-- .../UpdateNotificationsTransformerTest.kt | 8 +-- .../WcSendMultipleTransactionsComponent.kt | 2 + .../converter/WcSendTransactionUMConverter.kt | 8 +-- .../entity/addresses/WcGetAddressesUM.kt | 2 +- ...endMultipleTransactionsModalBottomSheet.kt | 7 ++- 11 files changed, 67 insertions(+), 68 deletions(-) diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/hottokens/portfolio/ui/OnrampAddToPortfolioContent.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/hottokens/portfolio/ui/OnrampAddToPortfolioContent.kt index db961c1580..ee0274ed13 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/hottokens/portfolio/ui/OnrampAddToPortfolioContent.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/hottokens/portfolio/ui/OnrampAddToPortfolioContent.kt @@ -111,7 +111,11 @@ private fun CurrencyNetworkName(text: TextReference, modifier: Modifier = Modifi private fun AddToPortfolioButton(state: OnrampAddToPortfolioUM.AddButtonUM, modifier: Modifier = Modifier) { TangemButton( text = state.text.resolveReference(), - icon = TangemButtonIconPosition.End(iconResId = R.drawable.ic_tangem_24), + icon = if (state.isTangemIconVisible) { + TangemButtonIconPosition.End(iconResId = R.drawable.ic_tangem_24) + } else { + TangemButtonIconPosition.None + }, onClick = state.onClick, colors = TangemButtonsDefaults.primaryButtonColors, showProgress = state.isProgress, diff --git a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/bottomsheet/TonInitializeAccountBottomSheetConfig.kt b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/bottomsheet/TonInitializeAccountBottomSheetConfig.kt index f941d083ec..67fd5d26a0 100644 --- a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/bottomsheet/TonInitializeAccountBottomSheetConfig.kt +++ b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/bottomsheet/TonInitializeAccountBottomSheetConfig.kt @@ -12,4 +12,5 @@ internal data class TonInitializeAccountBottomSheetConfig( val isButtonEnabled: Boolean, val isButtonLoading: Boolean, val feeState: FeeState, + val isColdWalletInteractionIconVisible: Boolean, ) : TangemBottomSheetConfigContent \ No newline at end of file diff --git a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/transformers/ton/ShowTonInitializeBottomSheetTransformer.kt b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/transformers/ton/ShowTonInitializeBottomSheetTransformer.kt index 27e17d0ca7..7db33d4392 100644 --- a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/transformers/ton/ShowTonInitializeBottomSheetTransformer.kt +++ b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/state/transformers/ton/ShowTonInitializeBottomSheetTransformer.kt @@ -25,6 +25,7 @@ internal class ShowTonInitializeBottomSheetTransformer( isButtonEnabled = false, feeState = FeeState.Loading, isButtonLoading = false, + isColdWalletInteractionIconVisible = prevState.isColdWalletInteractionIconVisible, ), ), ) diff --git a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/ui/bottomsheet/TonInitializeAccountBottomSheet.kt b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/ui/bottomsheet/TonInitializeAccountBottomSheet.kt index 21be5002e8..c4ef7779b9 100644 --- a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/ui/bottomsheet/TonInitializeAccountBottomSheet.kt +++ b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/ui/bottomsheet/TonInitializeAccountBottomSheet.kt @@ -101,23 +101,32 @@ internal fun TonInitializeAccountBottomSheet(config: TangemBottomSheetConfig) { SpacerH(height = 20.dp) - TangemButton( - text = stringResourceSafe(R.string.common_activate), - icon = TangemButtonIconPosition.End(iconResId = R.drawable.ic_tangem_24), - onClick = content.onButtonClick, - colors = TangemButtonsDefaults.primaryButtonColors, - showProgress = content.feeState is FeeState.Loading || content.isButtonLoading, - enabled = content.isButtonEnabled, - size = TangemButtonSize.WideAction, - textStyle = TangemTheme.typography.subtitle1, - modifier = Modifier.fillMaxWidth(), - ) + ActivateButton(content) SpacerH(height = 8.dp) } } } +@Composable +private fun ActivateButton(content: TonInitializeAccountBottomSheetConfig, modifier: Modifier = Modifier) { + TangemButton( + text = stringResourceSafe(R.string.common_activate), + icon = if (content.isColdWalletInteractionIconVisible) { + TangemButtonIconPosition.End(iconResId = R.drawable.ic_tangem_24) + } else { + TangemButtonIconPosition.None + }, + onClick = content.onButtonClick, + colors = TangemButtonsDefaults.primaryButtonColors, + showProgress = content.feeState is FeeState.Loading || content.isButtonLoading, + enabled = content.isButtonEnabled, + size = TangemButtonSize.WideAction, + textStyle = TangemTheme.typography.subtitle1, + modifier = modifier.fillMaxWidth(), + ) +} + // region Preview @Composable @Preview(showBackground = true, widthDp = 360) @@ -149,6 +158,7 @@ private fun Preview_TonInitializeAccountBottomSheetContent() { isFeeApproximate = false, isFeeConvertibleToFiat = true, ), + isColdWalletInteractionIconVisible = true, ), ), diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/model/TokenDetailsModel.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/model/TokenDetailsModel.kt index df605c6c7e..48d4cc262f 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/model/TokenDetailsModel.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/model/TokenDetailsModel.kt @@ -3,38 +3,29 @@ package com.tangem.feature.tokendetails.presentation.tokendetails.model import androidx.compose.runtime.Stable import arrow.core.getOrElse import arrow.core.right -import com.tangem.utils.logging.TangemLogger import com.arkivanov.decompose.router.slot.SlotNavigation import com.arkivanov.decompose.router.slot.activate import com.arkivanov.decompose.router.slot.dismiss import com.tangem.blockchain.common.address.AddressType -import com.tangem.domain.dynamicaddresses.IsDynamicAddressesAvailableUseCase -import com.tangem.domain.dynamicaddresses.IsXpubSupportedUseCase import com.tangem.common.extensions.calculateSha256 import com.tangem.common.extensions.hexToBytes import com.tangem.common.extensions.toHexString -import com.tangem.domain.dynamicaddresses.repository.DynamicAddressesRepository import com.tangem.common.routing.AppRoute import com.tangem.common.routing.AppRouter import com.tangem.common.ui.bottomsheet.receive.AddressModel import com.tangem.common.ui.bottomsheet.receive.mapToAddressModels -import com.tangem.features.rating.RatingComponent -import com.tangem.feature.swap.domain.SwapFeedbackUseCase -import com.tangem.feature.swap.domain.models.domain.SwapFeedbackParams -import com.tangem.features.swap.SwapFeatureToggles +import com.tangem.common.ui.tokens.getUnavailabilityReasonText +import com.tangem.common.ui.userwallet.converter.WalletIconUMConverter +import com.tangem.common.ui.userwallet.ext.walletInterationIcon import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.core.analytics.models.AnalyticsParam import com.tangem.core.analytics.models.event.OfframpAnalyticsEvent import com.tangem.core.decompose.di.GlobalUiMessageSender -import com.tangem.common.ui.userwallet.converter.WalletIconUMConverter -import com.tangem.domain.account.supplier.SingleAccountListSupplier -import com.tangem.domain.common.wallets.UserWalletsListRepository import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer import com.tangem.core.decompose.ui.UiMessageSender import com.tangem.core.navigation.url.UrlOpener -import com.tangem.common.ui.tokens.getUnavailabilityReasonText import com.tangem.core.ui.DesignFeatureToggles import com.tangem.core.ui.clipboard.ClipboardManager import com.tangem.core.ui.ds.image.DeviceIconUM @@ -50,13 +41,18 @@ import com.tangem.domain.account.status.usecase.IsAccountsModeEnabledUseCase import com.tangem.domain.account.status.usecase.IsCryptoCurrencyCouldHideUseCase import com.tangem.domain.account.status.usecase.ManageCryptoCurrenciesUseCase import com.tangem.domain.account.status.utils.CryptoCurrencyBalanceFetcher +import com.tangem.domain.account.supplier.SingleAccountListSupplier import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase import com.tangem.domain.card.IsWalletBackupProblematicUseCase -import com.tangem.domain.feedback.SendBackupProblemEmailUseCase +import com.tangem.domain.common.wallets.UserWalletsListRepository import com.tangem.domain.demo.IsDemoCardUseCase import com.tangem.domain.dynamicaddresses.DynamicAddressesSupportedBlockchains +import com.tangem.domain.dynamicaddresses.IsDynamicAddressesAvailableUseCase +import com.tangem.domain.dynamicaddresses.IsXpubSupportedUseCase +import com.tangem.domain.dynamicaddresses.repository.DynamicAddressesRepository +import com.tangem.domain.feedback.SendBackupProblemEmailUseCase import com.tangem.domain.models.StatusSource import com.tangem.domain.models.TokenReceiveNotification import com.tangem.domain.models.account.Account @@ -89,41 +85,23 @@ import com.tangem.domain.transaction.error.SendTransactionError import com.tangem.domain.transaction.usecase.* import com.tangem.domain.txhistory.usecase.GetExplorerTransactionUrlUseCase import com.tangem.domain.txhistory.usecase.GetFixedTxHistoryItemsUseCase -import com.tangem.domain.wallets.usecase.GetExploreUrlUseCase -import com.tangem.domain.wallets.usecase.GetWalletIconUseCase -import com.tangem.domain.wallets.usecase.GetExtendedPublicKeyForCurrencyUseCase -import com.tangem.domain.wallets.usecase.GetUserWalletUseCase -import com.tangem.domain.wallets.usecase.NetworkHasDerivationUseCase +import com.tangem.domain.wallets.usecase.* import com.tangem.domain.yield.supply.models.YieldSupplyRewardBalance import com.tangem.domain.yield.supply.usecase.YieldSupplyGetRewardsBalanceUseCase +import com.tangem.feature.swap.domain.SwapFeedbackUseCase +import com.tangem.feature.swap.domain.models.domain.SwapFeedbackParams import com.tangem.feature.tokendetails.deeplink.TokenDetailsDeepLinkActionListener import com.tangem.feature.tokendetails.domain.GetCurrencyWarningsUseCase import com.tangem.feature.tokendetails.presentation.router.InnerTokenDetailsRouter import com.tangem.feature.tokendetails.presentation.tokendetails.analytics.TokenDetailsCurrencyStatusAnalyticsSender import com.tangem.feature.tokendetails.presentation.tokendetails.analytics.TokenDetailsNotificationsAnalyticsSender import com.tangem.feature.tokendetails.presentation.tokendetails.route.TokenDetailsBottomSheetConfig -import com.tangem.feature.tokendetails.presentation.tokendetails.state.AddFundsUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenBalanceSegmentedButtonConfig -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsState -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsStateController -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TransferUM +import com.tangem.feature.tokendetails.presentation.tokendetails.state.* import com.tangem.feature.tokendetails.presentation.tokendetails.state.factory.QuickTopUpBlockFactory import com.tangem.feature.tokendetails.presentation.tokendetails.state.factory.TokenDetailsStateFactory -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.InitializeWithCryptoCurrencyTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.SetBalanceTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.SetYieldSupplyBalanceTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateActionButtonsTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateAddFundsTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateTransferTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateZeroBalanceActionsTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.BindAddFundsActionButtonTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.BindTransferActionButtonTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.SetTopBarTitleTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.ToggleBalanceTypeTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateStakingNotificationTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateNotificationsTransformer -import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.UpdateTopBarMenuTransformer +import com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer.* +import com.tangem.features.rating.RatingComponent +import com.tangem.features.swap.SwapFeatureToggles import com.tangem.features.tokendetails.ExpressTransactionsEvent import com.tangem.features.tokendetails.ExpressTransactionsEventListener import com.tangem.features.tokendetails.TokenDetailsComponent @@ -134,6 +112,7 @@ import com.tangem.features.yield.supply.api.analytics.YieldSupplyAnalytics import com.tangem.utils.Provider import com.tangem.utils.coroutines.* import com.tangem.utils.extensions.isZero +import com.tangem.utils.logging.TangemLogger import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll @@ -438,6 +417,7 @@ internal class TokenDetailsModel @Inject constructor( UpdateNotificationsTransformer( warnings = warnings, clickIntents = this@TokenDetailsModel, + walletInteractionIcon = walletInterationIcon(userWallet), ), ) } diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformer.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformer.kt index c292623e56..9fdd660903 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformer.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformer.kt @@ -1,5 +1,6 @@ package com.tangem.feature.tokendetails.presentation.tokendetails.state.transformer +import androidx.annotation.DrawableRes import com.tangem.blockchain.common.Blockchain import com.tangem.core.ui.R import com.tangem.core.ui.ds.button.TangemButtonType @@ -31,6 +32,7 @@ import com.tangem.core.res.R as CoreResR internal class UpdateNotificationsTransformer( private val warnings: Set, private val clickIntents: TokenDetailsClickIntents, + @DrawableRes private val walletInteractionIcon: Int?, ) : Transformer { override fun transform(prevState: TokenDetailsUM): TokenDetailsUM { @@ -170,10 +172,12 @@ internal class UpdateNotificationsTransformer( TangemMessageButtonUM( text = resourceReference(CoreResR.string.alert_button_try_again), type = TangemButtonType.Primary, - tangemIconUM = TangemIconUM.Icon( - R.drawable.ic_tangem_24, - tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted }, - ), + tangemIconUM = walletInteractionIcon?.let { iconRes -> + TangemIconUM.Icon( + iconRes = iconRes, + tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted }, + ) + }, onClick = clickIntents::onRetryIncompleteTransactionClick, ), ), diff --git a/features/tokendetails/impl/src/test/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformerTest.kt b/features/tokendetails/impl/src/test/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformerTest.kt index b87755d855..2634218c36 100644 --- a/features/tokendetails/impl/src/test/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformerTest.kt +++ b/features/tokendetails/impl/src/test/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/transformer/UpdateNotificationsTransformerTest.kt @@ -11,13 +11,8 @@ import com.tangem.domain.tokens.model.warnings.DynamicAddressesWarnings import com.tangem.domain.tokens.model.warnings.HederaWarnings import com.tangem.domain.tokens.model.warnings.KaspaWarnings import com.tangem.feature.tokendetails.presentation.tokendetails.model.TokenDetailsClickIntents -import com.tangem.feature.tokendetails.presentation.tokendetails.state.AddFundsUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsBalanceBlockUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsTopAppBarUM +import com.tangem.feature.tokendetails.presentation.tokendetails.state.* import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsTopAppBarUM.TitleState -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.TransferUM -import com.tangem.feature.tokendetails.presentation.tokendetails.state.ZeroBalanceActionsUM import io.mockk.mockk import io.mockk.verify import kotlinx.collections.immutable.persistentListOf @@ -684,6 +679,7 @@ class UpdateNotificationsTransformerTest { private fun createTransformer(warnings: Set) = UpdateNotificationsTransformer( warnings = warnings, clickIntents = clickIntents, + walletInteractionIcon = null, ) private fun initialState(): TokenDetailsUM = TokenDetailsUM( diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendMultipleTransactionsComponent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendMultipleTransactionsComponent.kt index 0146849910..9055828c14 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendMultipleTransactionsComponent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/components/send/WcSendMultipleTransactionsComponent.kt @@ -1,6 +1,7 @@ package com.tangem.features.walletconnect.transaction.components.send import androidx.compose.runtime.Composable +import com.tangem.common.ui.userwallet.ext.walletInterationIcon import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent @@ -26,6 +27,7 @@ internal class WcSendMultipleTransactionsComponent( onDismissRequest = { model.popBack() }, content = TangemBottomSheetConfigContent.Empty, ), + walletInteractionIcon = walletInterationIcon(model.userWallet), onConfirm = onConfirm, onBack = { model.popBack() }, ) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt index 6decf0a891..244639b337 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/converter/WcSendTransactionUMConverter.kt @@ -1,13 +1,10 @@ package com.tangem.features.walletconnect.transaction.converter import com.tangem.common.ui.account.AccountTitleUM +import com.tangem.common.ui.userwallet.ext.walletInterationIcon import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.isHotWallet -import com.tangem.domain.walletconnect.model.WcBitcoinMethod -import com.tangem.domain.walletconnect.model.WcEthMethod -import com.tangem.domain.walletconnect.model.WcMethod -import com.tangem.domain.walletconnect.model.WcPsbtOutput -import com.tangem.domain.walletconnect.model.WcSolanaMethod +import com.tangem.domain.walletconnect.model.* import com.tangem.domain.walletconnect.usecase.method.BlockAidTransactionCheck import com.tangem.domain.walletconnect.usecase.method.WcMethodContext import com.tangem.domain.walletconnect.usecase.method.WcSignState @@ -74,6 +71,7 @@ internal class WcSendTransactionUMConverter @Inject constructor( } }, feeErrorNotification = feeErrorNotification, + walletInteractionIcon = walletInterationIcon(value.context.session.wallet), isHoldToConfirmEnabled = value.context.session.wallet.isHotWallet, ), feeSelectorUM = when (value.feeState) { diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/addresses/WcGetAddressesUM.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/addresses/WcGetAddressesUM.kt index 05b5667a53..ca0721a511 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/addresses/WcGetAddressesUM.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/entity/addresses/WcGetAddressesUM.kt @@ -12,7 +12,7 @@ internal data class WcGetAddressesUM( val networkInfo: WcNetworkInfoUM, val addresses: List, val isLoading: Boolean, - @DrawableRes val walletInteractionIcon: Int, + @DrawableRes val walletInteractionIcon: Int?, val onApprove: () -> Unit, val onReject: () -> Unit, ) { diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendMultipleTransactionsModalBottomSheet.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendMultipleTransactionsModalBottomSheet.kt index 85a56ac9fb..ee70cb1a76 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendMultipleTransactionsModalBottomSheet.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/transaction/ui/send/WcSendMultipleTransactionsModalBottomSheet.kt @@ -1,6 +1,7 @@ package com.tangem.features.walletconnect.transaction.ui.send import android.content.res.Configuration +import androidx.annotation.DrawableRes import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth @@ -32,6 +33,7 @@ import com.tangem.core.ui.res.TangemThemePreview @Composable internal fun WcSendMultipleTransactionsModalBottomSheet( config: TangemBottomSheetConfig, + @DrawableRes walletInteractionIcon: Int?, onConfirm: () -> Unit, onBack: () -> Unit, ) { @@ -50,7 +52,7 @@ internal fun WcSendMultipleTransactionsModalBottomSheet( .background(TangemTheme.colors.icon.informative.copy(alpha = 0.1f)) .padding(12.dp), painter = rememberVectorPainter( - ImageVector.vectorResource(com.tangem.core.ui.R.drawable.ic_alert_24), + ImageVector.vectorResource(R.drawable.ic_alert_24), ), tint = TangemTheme.colors.icon.attention, contentDescription = null, @@ -78,7 +80,7 @@ internal fun WcSendMultipleTransactionsModalBottomSheet( SpacerH8() PrimaryButtonIconEnd( modifier = Modifier.fillMaxWidth(), - iconResId = R.drawable.ic_tangem_24, + iconResId = walletInteractionIcon, text = stringResourceSafe(R.string.common_send), onClick = onConfirm, ) @@ -98,6 +100,7 @@ private fun WcSendTransactionBottomSheetPreview() { onDismissRequest = {}, content = TangemBottomSheetConfigContent.Empty, ), + walletInteractionIcon = R.drawable.ic_tangem_24, onConfirm = {}, onBack = {}, )