diff --git a/app/src/main/assets/tangem-app-config b/app/src/main/assets/tangem-app-config
index 098662beb5..8285f8d289 160000
--- a/app/src/main/assets/tangem-app-config
+++ b/app/src/main/assets/tangem-app-config
@@ -1 +1 @@
-Subproject commit 098662beb5b0123b11f5ee4873d4bd667ac93c73
+Subproject commit 8285f8d2896d2994337f55a7b3a54fd5acc24304
diff --git a/app/src/main/java/com/tangem/tap/di/domain/YieldSupplyDomainModule.kt b/app/src/main/java/com/tangem/tap/di/domain/YieldSupplyDomainModule.kt
index d74844c082..c893ae8a08 100644
--- a/app/src/main/java/com/tangem/tap/di/domain/YieldSupplyDomainModule.kt
+++ b/app/src/main/java/com/tangem/tap/di/domain/YieldSupplyDomainModule.kt
@@ -204,6 +204,16 @@ internal object YieldSupplyDomainModule {
)
}
+ @Provides
+ @Singleton
+ fun provideYieldSupplyEnterStatusFlowUseCase(
+ yieldSupplyRepository: YieldSupplyRepository,
+ ): YieldSupplyEnterStatusFlowUseCase {
+ return YieldSupplyEnterStatusFlowUseCase(
+ yieldSupplyRepository = yieldSupplyRepository,
+ )
+ }
+
@Provides
@Singleton
fun provideYieldSupplyGetShouldShowMainPromoUseCase(
diff --git a/common/ui/src/main/java/com/tangem/common/ui/news/ArticleCard.kt b/common/ui/src/main/java/com/tangem/common/ui/news/ArticleCard.kt
index e0086f9b0c..43f01a3e93 100644
--- a/common/ui/src/main/java/com/tangem/common/ui/news/ArticleCard.kt
+++ b/common/ui/src/main/java/com/tangem/common/ui/news/ArticleCard.kt
@@ -95,8 +95,6 @@ private fun TrendingArticle(
TangemTheme.colors.text.primary1
},
style = TangemTheme.typography.h3,
- maxLines = 3,
- overflow = TextOverflow.Ellipsis,
textAlign = TextAlign.Center,
)
diff --git a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json
index 1c24b1d40c..5dc9541240 100644
--- a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json
+++ b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json
@@ -47,10 +47,6 @@
"name": "TANGEM_PAY_ENABLED",
"version": "5.31.0"
},
- {
- "name": "TANGEM_PAY_ENTRYPOINT_ENABLED",
- "version": "undefined"
- },
{
"name": "NEW_TOKEN_RECEIVE_ENABLED",
"version": "5.28.0"
diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml
index 900691f421..f583c64401 100644
--- a/core/res/src/main/res/values/strings.xml
+++ b/core/res/src/main/res/values/strings.xml
@@ -1469,6 +1469,9 @@
Freeze
Your card is frozen.
Get Help
+ Reason: %s
+ %s ยท %s
+ MCC %s
Other
Unable to use on rooted devices
Completed
diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt b/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt
index db823f8ad1..52caca9648 100644
--- a/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt
+++ b/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt
@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.ButtonColors
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
@@ -54,12 +55,16 @@ fun TextButtonIconStart(
onClick: () -> Unit,
modifier: Modifier = Modifier,
colors: ButtonColors = TangemButtonsDefaults.defaultTextButtonColors,
+ tint: Color? = null,
enabled: Boolean = true,
) {
TangemButton(
modifier = modifier,
text = text,
- icon = TangemButtonIconPosition.Start(iconResId),
+ icon = TangemButtonIconPosition.Start(
+ iconResId = iconResId,
+ iconTint = tint,
+ ),
onClick = onClick,
enabled = enabled,
showProgress = false,
@@ -117,13 +122,21 @@ fun PrimaryButtonIconEnd(
onClick: () -> Unit,
modifier: Modifier = Modifier,
size: TangemButtonSize = TangemButtonSize.Default,
+ tint: Color? = null,
showProgress: Boolean = false,
enabled: Boolean = true,
) {
TangemButton(
modifier = modifier,
text = text,
- icon = if (iconResId != null) TangemButtonIconPosition.End(iconResId) else TangemButtonIconPosition.None,
+ icon = if (iconResId != null) {
+ TangemButtonIconPosition.End(
+ iconResId = iconResId,
+ iconTint = tint,
+ )
+ } else {
+ TangemButtonIconPosition.None
+ },
onClick = onClick,
colors = TangemButtonsDefaults.primaryButtonColors,
enabled = enabled,
@@ -145,11 +158,15 @@ fun PrimaryButtonIconEndTwoLines(
showProgress: Boolean = false,
enabled: Boolean = true,
additionalText: String? = null,
+ tint: Color? = null,
) {
TangemButton(
modifier = modifier,
text = text,
- icon = TangemButtonIconPosition.End(iconResId),
+ icon = TangemButtonIconPosition.End(
+ iconResId = iconResId,
+ iconTint = tint,
+ ),
onClick = onClick,
colors = TangemButtonsDefaults.primaryButtonColors,
enabled = enabled,
@@ -171,13 +188,17 @@ fun PrimaryButtonIconStart(
modifier: Modifier = Modifier,
showProgress: Boolean = false,
enabled: Boolean = true,
+ tint: Color? = null,
size: TangemButtonSize = TangemButtonSize.Default,
shape: Shape = size.toShape(),
) {
TangemButton(
modifier = modifier,
text = text,
- icon = TangemButtonIconPosition.Start(iconResId),
+ icon = TangemButtonIconPosition.Start(
+ iconResId = iconResId,
+ iconTint = tint,
+ ),
onClick = onClick,
colors = TangemButtonsDefaults.primaryButtonColors,
enabled = enabled,
@@ -225,13 +246,17 @@ fun SecondaryButtonIconEnd(
modifier: Modifier = Modifier,
showProgress: Boolean = false,
enabled: Boolean = true,
+ tint: Color? = null,
size: TangemButtonSize = TangemButtonSize.Default,
shape: Shape = size.toShape(),
) {
TangemButton(
modifier = modifier,
text = text,
- icon = TangemButtonIconPosition.End(iconResId),
+ icon = TangemButtonIconPosition.End(
+ iconResId = iconResId,
+ iconTint = tint,
+ ),
onClick = onClick,
colors = TangemButtonsDefaults.secondaryButtonColors,
enabled = enabled,
@@ -253,13 +278,17 @@ fun SecondaryButtonIconStart(
modifier: Modifier = Modifier,
showProgress: Boolean = false,
enabled: Boolean = true,
+ iconTint: Color? = null,
size: TangemButtonSize = TangemButtonSize.Default,
shape: Shape = size.toShape(),
) {
TangemButton(
modifier = modifier,
text = text,
- icon = TangemButtonIconPosition.Start(iconResId),
+ icon = TangemButtonIconPosition.Start(
+ iconResId = iconResId,
+ iconTint = iconTint,
+ ),
onClick = onClick,
colors = TangemButtonsDefaults.secondaryButtonColors,
enabled = enabled,
diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButton.kt b/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButton.kt
index 4750445c40..302845e5ed 100644
--- a/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButton.kt
+++ b/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButton.kt
@@ -99,7 +99,7 @@ fun TangemButton(
.padding(vertical = 2.dp)
.testTag(BaseButtonTestTags.ICON),
painter = painterResource(id = iconResId),
- tint = colors.contentColor(enabled = enabled).value,
+ tint = icon.iconTint ?: colors.contentColor(enabled = enabled).value,
contentDescription = null,
)
},
diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButtonIconPosition.kt b/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButtonIconPosition.kt
index 0e6169baa3..d4914922cb 100644
--- a/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButtonIconPosition.kt
+++ b/core/ui/src/main/java/com/tangem/core/ui/components/buttons/common/TangemButtonIconPosition.kt
@@ -2,17 +2,27 @@ package com.tangem.core.ui.components.buttons.common
import androidx.annotation.DrawableRes
import androidx.compose.runtime.Immutable
+import androidx.compose.ui.graphics.Color
@Immutable
sealed interface TangemButtonIconPosition {
val iconResId: Int?
+ val iconTint: Color?
- data class Start(@DrawableRes override val iconResId: Int) : TangemButtonIconPosition
+ data class Start(
+ @DrawableRes override val iconResId: Int,
+ override val iconTint: Color? = null,
+ ) : TangemButtonIconPosition
- data class End(@DrawableRes override val iconResId: Int) : TangemButtonIconPosition
+ data class End(
+ @DrawableRes override val iconResId: Int,
+ override val iconTint: Color? = null,
+ ) : TangemButtonIconPosition
data object None : TangemButtonIconPosition {
@DrawableRes
override val iconResId: Int? = null
+
+ override val iconTint: Color? = null
}
}
\ No newline at end of file
diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/tokenlist/TokenListItem.kt b/core/ui/src/main/java/com/tangem/core/ui/components/tokenlist/TokenListItem.kt
index 3b11421742..ddfbb831bf 100644
--- a/core/ui/src/main/java/com/tangem/core/ui/components/tokenlist/TokenListItem.kt
+++ b/core/ui/src/main/java/com/tangem/core/ui/components/tokenlist/TokenListItem.kt
@@ -17,7 +17,6 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
-import com.tangem.core.ui.BuildConfig
import com.tangem.core.ui.R
import com.tangem.core.ui.components.SpacerW4
import com.tangem.core.ui.components.account.AccountCharIcon
@@ -33,9 +32,9 @@ import com.tangem.core.ui.components.token.state.TokenItemState
import com.tangem.core.ui.components.tokenlist.internal.GroupTitleItem
import com.tangem.core.ui.components.tokenlist.state.PortfolioTokensListItemUM
import com.tangem.core.ui.components.tokenlist.state.TokensListItemUM
-import com.tangem.core.ui.extensions.conditional
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.res.TangemTheme
+import com.tangem.core.ui.utils.ProvideSharedTransitionScope
/**
* Multi-currency content item
@@ -69,7 +68,7 @@ fun TokenListItem(state: TokensListItemUM, isBalanceHidden: Boolean, modifier: M
@Suppress("MagicNumber", "ReusedModifierInstance", "LongMethod")
@Composable
fun PortfolioListItem(state: TokensListItemUM.Portfolio, isBalanceHidden: Boolean, modifier: Modifier = Modifier) {
- SharedTransitionLayout(modifier) {
+ ProvideSharedTransitionScope(modifier) {
val iconSharedContentState = rememberSharedContentState(key = "icon_${state.id}")
val titleSharedContentState = rememberSharedContentState(key = "title_${state.id}")
val boundsTransform = BoundsTransform { _, _ -> tween(350) }
@@ -101,13 +100,11 @@ fun PortfolioListItem(state: TokensListItemUM.Portfolio, isBalanceHidden: Boolea
state = iconState,
withFixedSize = false,
modifier = modifier
- .conditional(BuildConfig.DEBUG.not()) {
- sharedBounds(
- sharedContentState = iconSharedContentState,
- animatedVisibilityScope = animatedContentScope,
- boundsTransform = boundsTransform,
- )
- },
+ .sharedBounds(
+ sharedContentState = iconSharedContentState,
+ animatedVisibilityScope = animatedContentScope,
+ boundsTransform = boundsTransform,
+ ),
)
},
title = { modifier: Modifier ->
@@ -126,14 +123,12 @@ fun PortfolioListItem(state: TokensListItemUM.Portfolio, isBalanceHidden: Boolea
state = state.tokenItemUM.titleState,
textStyle = textStyle.copy(fontSize = textSize.sp),
modifier = modifier
- .conditional(BuildConfig.DEBUG.not()) {
- sharedBounds(
- sharedContentState = titleSharedContentState,
- animatedVisibilityScope = animatedContentScope,
- boundsTransform = boundsTransform,
- resizeMode = scaleToBounds(ContentScale.Fit, Alignment.CenterStart),
- )
- },
+ .sharedBounds(
+ sharedContentState = titleSharedContentState,
+ animatedVisibilityScope = animatedContentScope,
+ boundsTransform = boundsTransform,
+ resizeMode = scaleToBounds(ContentScale.Fit, Alignment.CenterStart),
+ ),
)
},
)
diff --git a/core/ui/src/main/java/com/tangem/core/ui/utils/DateTimeFormatters.kt b/core/ui/src/main/java/com/tangem/core/ui/utils/DateTimeFormatters.kt
index 728da8c24c..50bee9b150 100644
--- a/core/ui/src/main/java/com/tangem/core/ui/utils/DateTimeFormatters.kt
+++ b/core/ui/src/main/java/com/tangem/core/ui/utils/DateTimeFormatters.kt
@@ -6,7 +6,6 @@ import com.tangem.core.ui.utils.DateTimeFormatters.dateMMMdd
import com.tangem.core.ui.utils.DateTimeFormatters.dateTimeFormatter
import com.tangem.core.ui.utils.DateTimeFormatters.dateYYYY
import org.joda.time.DateTime
-import org.joda.time.DateTimeZone
import org.joda.time.format.DateTimeFormat
import org.joda.time.format.DateTimeFormatter
import org.joda.time.format.DateTimeFormatterBuilder
@@ -18,7 +17,7 @@ object DateTimeFormatters {
/**
* Determine if the time is in 12-hour format ("10:00 PM") for the current locale.
*/
- val is12HourFormat by lazy {
+ private val is12HourFormat by lazy {
/**
* Two SS means, SHORT style for date and time.
* If pattern contains "a", it means time is in 12 hour format.
@@ -103,17 +102,15 @@ object DateTimeFormatters {
* Local full date formatter (e.g., "dd MMMM, HH:mm")
*/
val localFullDate: DateTimeFormatter by lazy {
+ val locale = Locale.getDefault()
+ val datePattern = DateFormat.getBestDateTimePattern(locale, "dd MMMM")
+ val timeSkeleton = if (is12HourFormat) "h:mm a" else "HH:mm"
+ val timePattern = DateFormat.getBestDateTimePattern(locale, timeSkeleton)
+ val fullPattern = "$datePattern, $timePattern"
DateTimeFormatterBuilder()
- .appendDayOfMonth(2)
- .appendLiteral(' ')
- .appendMonthOfYearText()
- .appendLiteral(", ")
- .appendHourOfDay(2)
- .appendLiteral(':')
- .appendMinuteOfHour(2)
+ .appendPattern(fullPattern)
.toFormatter()
- .withLocale(Locale.getDefault())
- .withZone(DateTimeZone.getDefault())
+ .withLocale(locale)
}
fun formatDate(date: DateTime, formatter: DateTimeFormatter = dateFormatter): String {
diff --git a/core/ui/src/main/java/com/tangem/core/ui/utils/SharedTransitionUtils.kt b/core/ui/src/main/java/com/tangem/core/ui/utils/SharedTransitionUtils.kt
new file mode 100644
index 0000000000..4851e2e34f
--- /dev/null
+++ b/core/ui/src/main/java/com/tangem/core/ui/utils/SharedTransitionUtils.kt
@@ -0,0 +1,36 @@
+package com.tangem.core.ui.utils
+
+import androidx.compose.animation.SharedTransitionLayout
+import androidx.compose.animation.SharedTransitionScope
+import androidx.compose.foundation.layout.Box
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.staticCompositionLocalOf
+import androidx.compose.ui.Modifier
+
+@Composable
+fun TangemSharedTransitionLayout(
+ modifier: Modifier = Modifier,
+ content: @Composable SharedTransitionScope.() -> Unit,
+) {
+ SharedTransitionLayout(modifier) {
+ val sharedTransitionScope = this
+ CompositionLocalProvider(
+ LocalSharedTransitionScope provides sharedTransitionScope,
+ ) {
+ content()
+ }
+ }
+}
+
+@Composable
+fun ProvideSharedTransitionScope(modifier: Modifier = Modifier, content: @Composable SharedTransitionScope.() -> Unit) {
+ val sharedTransitionScope = LocalSharedTransitionScope.current
+ Box(modifier) {
+ sharedTransitionScope.content()
+ }
+}
+
+private val LocalSharedTransitionScope = staticCompositionLocalOf {
+ error("No SharedTransitionScope provided")
+}
\ No newline at end of file
diff --git a/core/ui/src/main/res/drawable/ic_heart_filled_20.xml b/core/ui/src/main/res/drawable/ic_heart_filled_20.xml
new file mode 100644
index 0000000000..8578b94579
--- /dev/null
+++ b/core/ui/src/main/res/drawable/ic_heart_filled_20.xml
@@ -0,0 +1,11 @@
+
+
+
diff --git a/data/account/src/main/kotlin/com/tangem/data/account/tokens/DefaultMainAccountTokensMigration.kt b/data/account/src/main/kotlin/com/tangem/data/account/tokens/DefaultMainAccountTokensMigration.kt
index ce03285690..f03409232e 100644
--- a/data/account/src/main/kotlin/com/tangem/data/account/tokens/DefaultMainAccountTokensMigration.kt
+++ b/data/account/src/main/kotlin/com/tangem/data/account/tokens/DefaultMainAccountTokensMigration.kt
@@ -48,15 +48,17 @@ internal class DefaultMainAccountTokensMigration(
exception
}
val mainAccount = findAccount(response = response, derivationIndex = DerivationIndex.Main)
- val notMainAccounts = response.accounts
+ val customAccounts = response.accounts
.filterNot { accountDTO -> accountDTO.derivationIndex.toDerivationIndex().isMain }
- if (notMainAccounts.isEmpty()) {
+ if (customAccounts.isEmpty()) {
Timber.i("There is only the Main account. Nothing to migrate")
return@either response
}
+ val customAccountIndexes = customAccounts.mapTo(hashSetOf(), WalletAccountDTO::derivationIndex)
val unassignedTokens = mainAccount.groupUnassignedTokens()
+ .filter { it.key.value in customAccountIndexes }
if (unassignedTokens.isEmpty()) {
Timber.i("No unassigned tokens found for migration")
@@ -64,7 +66,7 @@ internal class DefaultMainAccountTokensMigration(
}
var updatedMainAccount = mainAccount
- val assignedTokensAccounts = notMainAccounts.mapNotNull { accountDTO ->
+ val assignedTokensAccounts = customAccounts.mapNotNull { accountDTO ->
val derivationIndex = accountDTO.derivationIndex.toDerivationIndex()
val tokensForAccount = unassignedTokens[derivationIndex]
if (tokensForAccount.isNullOrEmpty()) return@mapNotNull null
diff --git a/data/account/src/test/java/com/tangem/data/account/token/DefaultMainAccountTokensMigrationTest.kt b/data/account/src/test/java/com/tangem/data/account/token/DefaultMainAccountTokensMigrationTest.kt
index e4d0df9606..150d3ec917 100644
--- a/data/account/src/test/java/com/tangem/data/account/token/DefaultMainAccountTokensMigrationTest.kt
+++ b/data/account/src/test/java/com/tangem/data/account/token/DefaultMainAccountTokensMigrationTest.kt
@@ -376,6 +376,7 @@ class DefaultMainAccountTokensMigrationTest {
derivationIndex = DerivationIndex.Main.value,
tokens = listOf(
createBitcoin(accountIndex = 0),
+ createBitcoin(accountIndex = 10),
),
)
diff --git a/data/news/src/main/java/com/tangem/data/news/repository/DefaultNewsRepository.kt b/data/news/src/main/java/com/tangem/data/news/repository/DefaultNewsRepository.kt
index 84318ce9e7..3e3ef70c45 100644
--- a/data/news/src/main/java/com/tangem/data/news/repository/DefaultNewsRepository.kt
+++ b/data/news/src/main/java/com/tangem/data/news/repository/DefaultNewsRepository.kt
@@ -85,7 +85,7 @@ internal class DefaultNewsRepository(
articlesToUpdate.map { article ->
val isViewed = viewedFlags[article.id] == true
article.copy(viewed = isViewed)
- }.sortedBy { it.viewed }
+ }
}
.map, Either>> { it.right() }
.catch { emit(it.left()) }
diff --git a/data/transaction/src/main/java/com/tangem/data/transaction/DefaultGaslessTransactionRepository.kt b/data/transaction/src/main/java/com/tangem/data/transaction/DefaultGaslessTransactionRepository.kt
index d01ad65f42..85eb924072 100644
--- a/data/transaction/src/main/java/com/tangem/data/transaction/DefaultGaslessTransactionRepository.kt
+++ b/data/transaction/src/main/java/com/tangem/data/transaction/DefaultGaslessTransactionRepository.kt
@@ -149,7 +149,7 @@ class DefaultGaslessTransactionRepository(
}
private companion object {
- val BASE_GAS_FOR_TRANSACTION: BigInteger = BigInteger("100000")
+ val BASE_GAS_FOR_TRANSACTION: BigInteger = BigInteger("60000")
val EMPTY_ADDRESSES = emptySet()
}
}
\ No newline at end of file
diff --git a/data/visa/src/main/kotlin/com/tangem/data/pay/DefaultTangemPayEligibilityManager.kt b/data/visa/src/main/kotlin/com/tangem/data/pay/DefaultTangemPayEligibilityManager.kt
index 1f2acd1d9b..7225c10f60 100644
--- a/data/visa/src/main/kotlin/com/tangem/data/pay/DefaultTangemPayEligibilityManager.kt
+++ b/data/visa/src/main/kotlin/com/tangem/data/pay/DefaultTangemPayEligibilityManager.kt
@@ -9,7 +9,6 @@ import com.tangem.domain.pay.TangemPayEligibilityManager
import com.tangem.domain.pay.repository.OnboardingRepository
import com.tangem.domain.wallets.legacy.UserWalletsListManager
import com.tangem.features.hotwallet.HotWalletFeatureToggles
-import com.tangem.features.tangempay.TangemPayFeatureToggles
import com.tangem.hot.sdk.model.HotWalletId
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import kotlinx.coroutines.*
@@ -23,7 +22,6 @@ internal class DefaultTangemPayEligibilityManager @Inject constructor(
private val userWalletsListManager: UserWalletsListManager,
private val userWalletsListRepository: UserWalletsListRepository,
private val hotWalletFeatureToggles: HotWalletFeatureToggles,
- private val tangemPayFeatureToggles: TangemPayFeatureToggles,
private val onboardingRepository: OnboardingRepository,
) : TangemPayEligibilityManager {
@@ -128,8 +126,6 @@ internal class DefaultTangemPayEligibilityManager @Inject constructor(
}
private suspend fun checkTangemPayEligibility(): Boolean {
- if (!tangemPayFeatureToggles.isEntryPointsEnabled) return true
-
return onboardingRepository.getCustomerEligibility() || onboardingRepository.checkCustomerEligibility()
}
diff --git a/data/visa/src/main/kotlin/com/tangem/data/pay/di/TangemPayDataModule.kt b/data/visa/src/main/kotlin/com/tangem/data/pay/di/TangemPayDataModule.kt
index 93f2455ffb..719542728a 100644
--- a/data/visa/src/main/kotlin/com/tangem/data/pay/di/TangemPayDataModule.kt
+++ b/data/visa/src/main/kotlin/com/tangem/data/pay/di/TangemPayDataModule.kt
@@ -13,7 +13,6 @@ import com.tangem.domain.pay.usecase.TangemPayMainScreenCustomerInfoUseCase
import com.tangem.domain.tangempay.GetTangemPayCurrencyStatusUseCase
import com.tangem.domain.tangempay.TangemPayWithdrawUseCase
import com.tangem.domain.tangempay.repository.TangemPayTxHistoryRepository
-import com.tangem.features.tangempay.TangemPayFeatureToggles
import com.tangem.security.DeviceSecurityInfoProvider
import dagger.Binds
import dagger.Module
@@ -78,14 +77,12 @@ internal interface TangemPayDataModule {
customerOrderRepository: CustomerOrderRepository,
tangemPayOnboardingRepository: OnboardingRepository,
eligibilityManager: TangemPayEligibilityManager,
- tangemPayFeatureToggles: TangemPayFeatureToggles,
deviceSecurity: DeviceSecurityInfoProvider,
): TangemPayMainScreenCustomerInfoUseCase {
return TangemPayMainScreenCustomerInfoUseCase(
onboardingRepository = repository,
customerOrderRepository = customerOrderRepository,
eligibilityManager = eligibilityManager,
- tangemPayFeatureToggles = tangemPayFeatureToggles,
deviceSecurity = deviceSecurity,
)
}
diff --git a/data/visa/src/main/kotlin/com/tangem/data/visa/utils/TangemPayTxHistoryItemConverter.kt b/data/visa/src/main/kotlin/com/tangem/data/visa/utils/TangemPayTxHistoryItemConverter.kt
index b8ecc58913..23187867a8 100644
--- a/data/visa/src/main/kotlin/com/tangem/data/visa/utils/TangemPayTxHistoryItemConverter.kt
+++ b/data/visa/src/main/kotlin/com/tangem/data/visa/utils/TangemPayTxHistoryItemConverter.kt
@@ -46,6 +46,7 @@ internal class TangemPayTxHistoryItemConverter(moshi: Moshi) :
merchantCategory = spend.merchantCategory,
status = TangemPayTxHistoryItemStatusConverter.convert(spend.status),
enrichedMerchantIconUrl = spend.enrichedMerchantIcon,
+ declinedReason = spend.declinedReason,
)
}
diff --git a/data/wallet-manager/src/main/java/com/tangem/data/walletmanager/DefaultWalletManagersFacade.kt b/data/wallet-manager/src/main/java/com/tangem/data/walletmanager/DefaultWalletManagersFacade.kt
index d3937680e7..b2b04e77fa 100644
--- a/data/wallet-manager/src/main/java/com/tangem/data/walletmanager/DefaultWalletManagersFacade.kt
+++ b/data/wallet-manager/src/main/java/com/tangem/data/walletmanager/DefaultWalletManagersFacade.kt
@@ -280,6 +280,12 @@ internal class DefaultWalletManagersFacade @Inject constructor(
),
)
+ val gaslessFeeAddresses = try {
+ gaslessTransactionRepository.getGaslessFeeAddresses()
+ } catch (error: Throwable) {
+ Timber.e(error, "Failed to load gasless fee addresses; falling back to empty set")
+ emptySet()
+ }
return when (itemsResult) {
is Result.Success -> PaginationWrapper(
currentPage = sdkPageConverter.convert(page),
@@ -287,7 +293,7 @@ internal class DefaultWalletManagersFacade @Inject constructor(
items = SdkTransactionHistoryItemConverter(
smartContractMethods = readSmartContractMethods(),
yieldSupplyAddresses = YIELD_SUPPLY_ADDRESSES,
- gaslessFeeAddresses = gaslessTransactionRepository.getGaslessFeeAddresses(),
+ gaslessFeeAddresses = gaslessFeeAddresses,
).convertList(itemsResult.data.items),
)
is Result.Failure -> error(itemsResult.error.message ?: itemsResult.error.customMessage)
diff --git a/data/yield-supply/src/main/java/com/tangem/data/yield/supply/DefaultYieldSupplyRepository.kt b/data/yield-supply/src/main/java/com/tangem/data/yield/supply/DefaultYieldSupplyRepository.kt
index 3565a65952..22f5b7a42e 100644
--- a/data/yield-supply/src/main/java/com/tangem/data/yield/supply/DefaultYieldSupplyRepository.kt
+++ b/data/yield-supply/src/main/java/com/tangem/data/yield/supply/DefaultYieldSupplyRepository.kt
@@ -27,9 +27,10 @@ import com.tangem.domain.yield.supply.models.YieldSupplyPendingStatus
import com.tangem.domain.yield.supply.models.YieldSupplyMarketChartData
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.update
import kotlinx.coroutines.withContext
-import java.util.concurrent.ConcurrentHashMap
internal class DefaultYieldSupplyRepository(
private val yieldSupplyApi: YieldSupplyApi,
@@ -40,7 +41,7 @@ internal class DefaultYieldSupplyRepository(
private val appPreferencesStore: AppPreferencesStore,
) : YieldSupplyRepository {
- private val statusMap: MutableMap = ConcurrentHashMap()
+ private val statusMapFlow = MutableStateFlow