Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-21 16:37:35 +03:00
parent e8295055f0
commit b597786638
4 changed files with 13 additions and 12 deletions

@ -1 +1 @@
Subproject commit 27ddebaece01b8e13a9bbafd51f5ff1d64efc2a6
Subproject commit 7c568701ed57a31b0f1086820435dfc5761714c1

View file

@ -142,8 +142,8 @@ class SendTransactionUseCase(
* Sends tx hash to backend for specific transaction types
*/
private suspend fun sendHashToBackendIfNeeded(transaction: TransactionData, txHash: String) {
(transaction as? TransactionData.Uncompiled)?.let {
val extras = it.extras
(transaction as? TransactionData.Uncompiled)?.let { tx ->
val extras = tx.extras
when (extras) {
is EthereumTransactionExtras -> {
val txType = when (extras.callData) {

View file

@ -306,8 +306,9 @@ internal class YieldSupplyModel @Inject constructor(
private fun loadActiveState(cryptoCurrencyStatus: CryptoCurrencyStatus, yieldSupplyStatus: YieldSupplyStatus) {
val cryptoCurrencyToken = cryptoCurrency as? CryptoCurrency.Token ?: return
val showWarningIcon = !yieldSupplyStatus.isAllowedToSpend
val showInfoIconPrevState = when (uiState) {
is YieldSupplyUM.Content -> uiState.showInfoIcon
val state = uiState.value
val isShowInfoIconPrevState = when (state) {
is YieldSupplyUM.Content -> state.showInfoIcon
else -> false
}
if (!yieldSupplyStatus.isAllowedToSpend) {
@ -337,13 +338,13 @@ internal class YieldSupplyModel @Inject constructor(
),
onClick = ::onActiveClick,
showWarningIcon = showWarningIcon,
showInfoIcon = showInfoIconPrevState,
showInfoIcon = isShowInfoIconPrevState,
apy = tokenStatus.apy.toString(),
)
}
computeAndApplyShowInfoIcon(cryptoCurrencyStatus)
}.onLeft {
Timber.e(it)
}.onLeft { t ->
Timber.e(t)
uiState.update {
YieldSupplyUM.Content(
title = resourceReference(
@ -355,7 +356,7 @@ internal class YieldSupplyModel @Inject constructor(
rewardsApy = TextReference.EMPTY,
onClick = ::onActiveClick,
showWarningIcon = showWarningIcon,
showInfoIcon = showInfoIconPrevState,
showInfoIcon = isShowInfoIconPrevState,
apy = "",
)
}
@ -366,7 +367,7 @@ internal class YieldSupplyModel @Inject constructor(
private fun computeAndApplyShowInfoIcon(cryptoCurrencyStatus: CryptoCurrencyStatus) {
modelScope.launch(dispatchers.default) {
val showInfoIcon = if (cryptoCurrencyStatus.hasNotSuppliedAmount()) {
val isShowInfoIcon = if (cryptoCurrencyStatus.hasNotSuppliedAmount()) {
val minAmount = yieldSupplyMinAmountUseCase(userWallet, cryptoCurrencyStatus).getOrNull()
if (minAmount != null) {
cryptoCurrencyStatus.shouldShowNotSuppliedInfoIcon(minAmount)
@ -378,7 +379,7 @@ internal class YieldSupplyModel @Inject constructor(
}
uiState.update { state ->
when (state) {
is YieldSupplyUM.Content -> state.copy(showInfoIcon = showInfoIcon)
is YieldSupplyUM.Content -> state.copy(showInfoIcon = isShowInfoIcon)
else -> state
}
}

View file

@ -5,7 +5,7 @@
# https://github.com/tangem/tangem-sdk-android/
# https://github.com/tangem/vico
tangemBlockchainSdk = "develop-1308"
tangemBlockchainSdk = "develop-1309"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-564"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^