diff --git a/core/config-toggles/src/main/assets/configs/excluded_blockchains_config.json b/core/config-toggles/src/main/assets/configs/excluded_blockchains_config.json
index 5a48cc92c0..ae77ec7b7c 100644
--- a/core/config-toggles/src/main/assets/configs/excluded_blockchains_config.json
+++ b/core/config-toggles/src/main/assets/configs/excluded_blockchains_config.json
@@ -10,9 +10,5 @@
{
"name": "NEXA/test",
"version": "undefined"
- },
- {
- "name": "clore-ai",
- "version": "undefined"
}
]
\ No newline at end of file
diff --git a/core/res/src/main/res/values-fr/strings.xml b/core/res/src/main/res/values-fr/strings.xml
index 4972952622..e6647acb4d 100644
--- a/core/res/src/main/res/values-fr/strings.xml
+++ b/core/res/src/main/res/values-fr/strings.xml
@@ -580,6 +580,7 @@
Cartes identiques
Code d\'accès
Disponible avec %s
+ L\'achat de crypto-monnaies sur Tangem est assuré par des fournisseurs tiers selon leurs conditions.
Recherche par pays
Indisponible
Autres devises
diff --git a/core/res/src/main/res/values-ru/strings.xml b/core/res/src/main/res/values-ru/strings.xml
index 4bd80de49f..f63d0d3e28 100644
--- a/core/res/src/main/res/values-ru/strings.xml
+++ b/core/res/src/main/res/values-ru/strings.xml
@@ -51,6 +51,8 @@
Больше не показывать
Понятно
Балансы скрыты
+ Согласно информации от разработчиков сети, токены Kaspa находятся в режиме бета. Следите за обновлениями!
+ Бета режим
Пожалуйста, отсканируйте карту или кольцо
Пожалуйста, попробуйте снова через 30 секунд или отсканируйте карту или кольцо
Слишком много попыток
@@ -227,7 +229,7 @@
Не выбрано
Сеть
Сеть
- Вы можете добавить токен в ручную, если он не поддерживается Tangem
+ Вы можете добавить токен вручную, если он не поддерживается Tangem
Например, USDC
Символ
Символ токена
diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml
index ede0aab5f3..99759792da 100644
--- a/core/res/src/main/res/values/strings.xml
+++ b/core/res/src/main/res/values/strings.xml
@@ -51,6 +51,8 @@
Don\'t show again
Got it
Balances are hidden
+ According to the blockchain developers, Kaspa tokens are currently in beta. Stay tuned for updates!
+ Beta Mode
Please scan the card or ring
Please try again in 30 seconds or scan the card or ring
Too many attempts
diff --git a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/analytics/TokenScreenAnalyticsEvent.kt b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/analytics/TokenScreenAnalyticsEvent.kt
index d42f2f31b5..804f5d06c5 100644
--- a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/analytics/TokenScreenAnalyticsEvent.kt
+++ b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/analytics/TokenScreenAnalyticsEvent.kt
@@ -74,6 +74,16 @@ sealed class TokenScreenAnalyticsEvent(
params = mapOf("Token" to tokenSymbol, "Blockchain" to blockchain),
)
+ class RevealTryAgain(tokenSymbol: String, blockchain: String) : TokenScreenAnalyticsEvent(
+ event = "Button - Reveal Try Again",
+ params = mapOf("Token" to tokenSymbol, "Blockchain" to blockchain),
+ )
+
+ class RevealCancel(tokenSymbol: String, blockchain: String) : TokenScreenAnalyticsEvent(
+ event = "Button - Reveal Cancel",
+ params = mapOf("Token" to tokenSymbol, "Blockchain" to blockchain),
+ )
+
data class StakingClicked(val token: String) : TokenScreenAnalyticsEvent(
event = "Staking Clicked",
params = mapOf("Token" to token),
diff --git a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt
index 4c4473250c..ccd2264205 100644
--- a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt
+++ b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt
@@ -57,4 +57,6 @@ sealed class CryptoCurrencyWarning {
val amount: BigDecimal,
val maxAmount: BigDecimal?,
) : CryptoCurrencyWarning()
+
+ data object TokensInBetaWarning : CryptoCurrencyWarning()
}
\ No newline at end of file
diff --git a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt
index 3e54e19951..e6975190ee 100644
--- a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt
+++ b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt
@@ -173,6 +173,7 @@ class GetCurrencyWarningsUseCase(
when {
tokenStatus != null && coinStatus != null -> {
buildList {
+ getIsBetaTokensWarning(tokenStatus.currency)?.let(::add)
getFeeWarning(
userWalletId = userWalletId,
coinStatus = coinStatus,
@@ -219,6 +220,15 @@ class GetCurrencyWarningsUseCase(
}
}
+ private fun getIsBetaTokensWarning(currency: CryptoCurrency): CryptoCurrencyWarning? {
+ val isTokenBetaFunctionality = BlockchainUtils.isTokenBetaFunctionality(currency.network.id.value)
+ return if (currency is CryptoCurrency.Token && isTokenBetaFunctionality) {
+ CryptoCurrencyWarning.TokensInBetaWarning
+ } else {
+ null
+ }
+ }
+
private suspend fun constructTokenBalanceNotEnoughWarning(
userWalletId: UserWalletId,
tokenStatus: CryptoCurrencyStatus,
diff --git a/features/referral/presentation/build.gradle.kts b/features/referral/presentation/build.gradle.kts
index ef6062abd5..93d3ad159f 100644
--- a/features/referral/presentation/build.gradle.kts
+++ b/features/referral/presentation/build.gradle.kts
@@ -24,6 +24,7 @@ dependencies {
implementation(deps.androidx.appCompat)
implementation(deps.androidx.fragment.ktx)
implementation(deps.lifecycle.viewModel.ktx)
+ implementation(deps.androidx.activity.compose)
/** Compose */
implementation(deps.compose.foundation)
diff --git a/features/referral/presentation/src/main/java/com/tangem/feature/referral/ui/ReferralScreen.kt b/features/referral/presentation/src/main/java/com/tangem/feature/referral/ui/ReferralScreen.kt
index 9fe33b7bd6..a3a69e7bd8 100644
--- a/features/referral/presentation/src/main/java/com/tangem/feature/referral/ui/ReferralScreen.kt
+++ b/features/referral/presentation/src/main/java/com/tangem/feature/referral/ui/ReferralScreen.kt
@@ -2,6 +2,7 @@ package com.tangem.feature.referral.ui
import android.content.res.Configuration
import android.content.res.Resources
+import androidx.activity.compose.BackHandler
import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
@@ -52,6 +53,8 @@ internal fun ReferralScreen(stateHolder: ReferralStateHolder) {
val snackbarHostState = remember(::SnackbarHostState)
+ BackHandler(onBack = stateHolder.headerState.onBackClicked)
+
Scaffold(
topBar = {
AppBarWithBackButton(
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsAnalyticsEvent.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsAnalyticsEvent.kt
index 8c5f6c268f..5362f40522 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsAnalyticsEvent.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsAnalyticsEvent.kt
@@ -23,5 +23,10 @@ internal open class TokenDetailsAnalyticsEvent(
event = "Not Enough Fee",
params = currency.toAnalyticsParams(),
)
+
+ class Reveal(currency: CryptoCurrency) : Notice(
+ event = "Reveal Transaction",
+ params = currency.toAnalyticsParams(),
+ )
}
}
\ No newline at end of file
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt
index 836894e575..8e3ed14b1c 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt
@@ -41,6 +41,9 @@ internal class TokenDetailsNotificationsAnalyticsSender(
programName = TokenSwapPromoAnalyticsEvent.ProgramName.OKX,
source = AnalyticsParam.ScreensSources.Token,
)
+ is TokenDetailsNotification.KaspaIncompleteTransactionWarning -> TokenDetailsAnalyticsEvent.Notice.Reveal(
+ currency = cryptoCurrency,
+ )
is TokenDetailsNotification.NetworksUnreachable,
is TokenDetailsNotification.ExistentialDeposit,
is TokenDetailsNotification.NetworksNoAccount,
@@ -48,9 +51,9 @@ internal class TokenDetailsNotificationsAnalyticsSender(
is TokenDetailsNotification.RentInfo,
is TokenDetailsNotification.NetworkShutdown,
is TokenDetailsNotification.HederaAssociateWarning,
- is TokenDetailsNotification.KaspaIncompleteTransactionWarning,
is TokenDetailsNotification.KoinosMana,
is TokenDetailsNotification.MigrationMaticToPol,
+ is TokenDetailsNotification.TokensInBeta,
-> null
}
}
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/utils/CryptoCurrencyMapper.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/utils/CryptoCurrencyMapper.kt
index d63835def0..c01c196347 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/utils/CryptoCurrencyMapper.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/utils/CryptoCurrencyMapper.kt
@@ -5,6 +5,6 @@ import com.tangem.domain.tokens.model.CryptoCurrency
internal fun CryptoCurrency.toAnalyticsParams(): Map {
return mapOf(
"Token" to symbol,
- "Blockchain" to network.currencySymbol,
+ "Blockchain" to network.name,
)
}
\ No newline at end of file
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt
index 86db0a1bf3..abc78abbec 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt
@@ -229,4 +229,9 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) {
title = resourceReference(id = R.string.warning_matic_migration_title),
subtitle = resourceReference(id = R.string.warning_matic_migration_message),
)
+
+ data object TokensInBeta : Warning(
+ title = resourceReference(id = R.string.beta_mode_warning_title),
+ subtitle = resourceReference(id = R.string.beta_mode_warning_message),
+ )
}
\ No newline at end of file
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt
index b1435ae301..1c0e9869ad 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt
@@ -135,6 +135,7 @@ internal class TokenDetailsNotificationConverter(
},
)
is CryptoCurrencyWarning.MigrationMaticToPol -> MigrationMaticToPol
+ is CryptoCurrencyWarning.TokensInBetaWarning -> TokensInBeta
}
}
diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/viewmodels/TokenDetailsViewModel.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/viewmodels/TokenDetailsViewModel.kt
index 250f345a70..e2446726d6 100644
--- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/viewmodels/TokenDetailsViewModel.kt
+++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/viewmodels/TokenDetailsViewModel.kt
@@ -825,6 +825,12 @@ internal class TokenDetailsViewModel @Inject constructor(
}
override fun onRetryIncompleteTransactionClick() {
+ analyticsEventsHandler.send(
+ TokenScreenAnalyticsEvent.RevealTryAgain(
+ tokenSymbol = cryptoCurrency.symbol,
+ blockchain = cryptoCurrency.network.name,
+ ),
+ )
viewModelScope.launch {
retryIncompleteTransactionUseCase(
userWalletId = userWalletId,
@@ -860,6 +866,12 @@ internal class TokenDetailsViewModel @Inject constructor(
}
override fun onDismissIncompleteTransactionClick() {
+ analyticsEventsHandler.send(
+ TokenScreenAnalyticsEvent.RevealCancel(
+ tokenSymbol = cryptoCurrency.symbol,
+ blockchain = cryptoCurrency.network.name,
+ ),
+ )
viewModelScope.launch {
internalUiState.value = stateFactory.getStateWithDismissIncompleteTransactionConfirmDialog()
}
diff --git a/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt b/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt
index 80b0af4a35..5e1a12c171 100644
--- a/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt
+++ b/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt
@@ -141,4 +141,9 @@ object BlockchainUtils {
private fun getNetworkNameWithoutTestnet(blockchain: Blockchain): String {
return blockchain.getNetworkName().replace(oldValue = " Testnet", newValue = "")
}
+
+ fun isTokenBetaFunctionality(blockchainId: String): Boolean {
+ val blockchain = Blockchain.fromId(blockchainId)
+ return blockchain == Blockchain.Kaspa
+ }
}
\ No newline at end of file