Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-05 10:18:52 +01:00
parent 80a13febdf
commit 920fc0ff57
2 changed files with 16 additions and 10 deletions

View file

@ -199,9 +199,9 @@ class GetOnrampOffersUseCase(
): List<OnrampOffer> {
return buildList {
if (isSameOffer(bestRateOffer, fastestOffer)) {
bestRateOffer?.let { offer ->
if (bestRateOffer != null && !isSameOffer(bestRateOffer, recentOffer)) {
add(
offer.copy(
bestRateOffer.copy(
advantages = OnrampOfferAdvantages.GreatRate,
rateDif = null,
),

View file

@ -1,6 +1,7 @@
package com.tangem.features.onramp.mainv2.ui
import android.content.res.Configuration
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
@ -57,14 +58,19 @@ internal fun OnrampOffersContent(state: OnrampOffersBlockUM) {
}
}
Text(
modifier = Modifier.padding(start = 12.dp),
text = stringResourceSafe(R.string.onramp_recommended_title),
style = TangemTheme.typography.subtitle2,
color = TangemTheme.colors.text.tertiary,
)
SpacerH(8.dp)
AnimatedVisibility(
visible = state.recommended.isNotEmpty(),
) {
if (state.recommended.isNotEmpty()) {
Text(
modifier = Modifier.padding(start = 12.dp),
text = stringResourceSafe(R.string.onramp_recommended_title),
style = TangemTheme.typography.subtitle2,
color = TangemTheme.colors.text.tertiary,
)
SpacerH(8.dp)
}
}
state.recommended.fastForEach { offer ->
key("${offer.paymentMethod.id} ${offer.providerName} ${offer.rate}") {