diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/SwapTransactionsState.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/SwapTransactionsState.kt index 11d4b21719..5e42550ab6 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/SwapTransactionsState.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/SwapTransactionsState.kt @@ -29,7 +29,7 @@ internal data class SwapTransactionsState( val fromFiatAmount: String, val fromCurrencyIcon: TokenIconState, val onClick: () -> Unit, - val onGoToProviderClick: () -> Unit, + val onGoToProviderClick: (String) -> Unit, ) internal class ExchangeStatusState( diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsSwapTransactionsStateConverter.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsSwapTransactionsStateConverter.kt index 1c53790afa..0c6b75dfed 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsSwapTransactionsStateConverter.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsSwapTransactionsStateConverter.kt @@ -96,11 +96,11 @@ internal class TokenDetailsSwapTransactionsStateConverter( fromFiatAmount = getFiatAmount(fromFiatAmount), fromCurrencyIcon = iconStateConverter.convert(fromCurrency), onClick = { clickIntents.onSwapTransactionClick(transaction.txId, transaction.status?.status) }, - onGoToProviderClick = { + onGoToProviderClick = { url -> analyticsEventsHandlerProvider().send( TokenExchangeAnalyticsEvent.GoToProviderStatus(cryptoCurrency.symbol), ) - clickIntents.onGoToProviderClick(url = transaction.status?.txUrl.orEmpty()) + clickIntents.onGoToProviderClick(url = url) }, ), ) diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/ui/components/exchange/ExchangeStatusBottomSheet.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/ui/components/exchange/ExchangeStatusBottomSheet.kt index 743b214df8..f8850738e2 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/ui/components/exchange/ExchangeStatusBottomSheet.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/ui/components/exchange/ExchangeStatusBottomSheet.kt @@ -1,7 +1,6 @@ package com.tangem.feature.tokendetails.presentation.tokendetails.ui.components.exchange import androidx.compose.animation.AnimatedContent -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text @@ -78,8 +77,8 @@ private fun ExchangeStatusBottomSheetContent(content: ExchangeStatusBottomSheetC SpacerH12() ExchangeStatusBlock( statuses = config.statuses, - showLink = notification.value == null, - onClick = config.onGoToProviderClick, + showLink = notification.value == null && config.txUrl != null, + onClick = { config.onGoToProviderClick(config.txUrl.orEmpty()) }, ) AnimatedContent( targetState = notification.value,