Updated on 2026-08-14
This commit is contained in:
parent
2cf2c9ed1d
commit
f54d7eaa57
7 changed files with 1 additions and 24 deletions
|
|
@ -60,7 +60,5 @@ sealed class CryptoCurrencyWarning {
|
|||
val maxAmount: BigDecimal?,
|
||||
) : CryptoCurrencyWarning()
|
||||
|
||||
data object TokensInBetaWarning : CryptoCurrencyWarning()
|
||||
|
||||
data object UsedOutdatedDataWarning : CryptoCurrencyWarning()
|
||||
}
|
||||
|
|
@ -93,7 +93,6 @@ class GetCurrencyWarningsUseCase(
|
|||
tokenStatus != null && coinStatus != null -> {
|
||||
buildList {
|
||||
getUsedOutdatedDataWarning(tokenStatus)?.let(::add)
|
||||
getIsBetaTokensWarning(tokenStatus.currency)?.let(::add)
|
||||
getFeeWarning(
|
||||
userWalletId = userWalletId,
|
||||
coinStatus = coinStatus,
|
||||
|
|
@ -146,15 +145,6 @@ class GetCurrencyWarningsUseCase(
|
|||
}
|
||||
}
|
||||
|
||||
private fun getIsBetaTokensWarning(currency: CryptoCurrency): CryptoCurrencyWarning? {
|
||||
val isTokenBetaFunctionality = BlockchainUtils.isTokenBetaFunctionality(currency.network.rawId)
|
||||
return if (currency is CryptoCurrency.Token && isTokenBetaFunctionality) {
|
||||
CryptoCurrencyWarning.TokensInBetaWarning
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun constructTokenBalanceNotEnoughWarning(
|
||||
userWalletId: UserWalletId,
|
||||
tokenStatus: CryptoCurrencyStatus,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ internal class TokenDetailsNotificationsAnalyticsSender(
|
|||
is TokenDetailsNotification.HederaAssociateWarning,
|
||||
is TokenDetailsNotification.KoinosMana,
|
||||
is TokenDetailsNotification.MigrationMaticToPol,
|
||||
is TokenDetailsNotification.TokensInBeta,
|
||||
is TokenDetailsNotification.UsedOutdatedData,
|
||||
-> null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,11 +230,6 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) {
|
|||
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),
|
||||
)
|
||||
|
||||
data object UsedOutdatedData : TokenDetailsNotification(
|
||||
config = NotificationConfig(
|
||||
subtitle = resourceReference(R.string.warning_some_token_balances_not_updated),
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ internal class TokenDetailsNotificationConverter(
|
|||
},
|
||||
)
|
||||
is CryptoCurrencyWarning.MigrationMaticToPol -> MigrationMaticToPol
|
||||
is CryptoCurrencyWarning.TokensInBetaWarning -> TokensInBeta
|
||||
is CryptoCurrencyWarning.UsedOutdatedDataWarning -> UsedOutdatedData
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
# https://github.com/tangem/tangem-sdk-android/
|
||||
# https://github.com/tangem/vico
|
||||
|
||||
|
||||
tangemBlockchainSdk = "develop-1076"
|
||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||
tangemCardSdk = "develop-475"
|
||||
|
|
|
|||
|
|
@ -166,9 +166,4 @@ object BlockchainUtils {
|
|||
private fun getNetworkNameWithoutTestnet(blockchain: Blockchain): String {
|
||||
return blockchain.fullName.replace(oldValue = " Testnet", newValue = "")
|
||||
}
|
||||
|
||||
fun isTokenBetaFunctionality(blockchainId: String): Boolean {
|
||||
val blockchain = Blockchain.fromId(blockchainId)
|
||||
return blockchain == Blockchain.Kaspa
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue