Updated on 2026-08-14
This commit is contained in:
parent
80a13febdf
commit
920fc0ff57
2 changed files with 16 additions and 10 deletions
|
|
@ -199,9 +199,9 @@ class GetOnrampOffersUseCase(
|
||||||
): List<OnrampOffer> {
|
): List<OnrampOffer> {
|
||||||
return buildList {
|
return buildList {
|
||||||
if (isSameOffer(bestRateOffer, fastestOffer)) {
|
if (isSameOffer(bestRateOffer, fastestOffer)) {
|
||||||
bestRateOffer?.let { offer ->
|
if (bestRateOffer != null && !isSameOffer(bestRateOffer, recentOffer)) {
|
||||||
add(
|
add(
|
||||||
offer.copy(
|
bestRateOffer.copy(
|
||||||
advantages = OnrampOfferAdvantages.GreatRate,
|
advantages = OnrampOfferAdvantages.GreatRate,
|
||||||
rateDif = null,
|
rateDif = null,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.tangem.features.onramp.mainv2.ui
|
package com.tangem.features.onramp.mainv2.ui
|
||||||
|
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
|
@ -57,14 +58,19 @@ internal fun OnrampOffersContent(state: OnrampOffersBlockUM) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(
|
AnimatedVisibility(
|
||||||
modifier = Modifier.padding(start = 12.dp),
|
visible = state.recommended.isNotEmpty(),
|
||||||
text = stringResourceSafe(R.string.onramp_recommended_title),
|
) {
|
||||||
style = TangemTheme.typography.subtitle2,
|
if (state.recommended.isNotEmpty()) {
|
||||||
color = TangemTheme.colors.text.tertiary,
|
Text(
|
||||||
)
|
modifier = Modifier.padding(start = 12.dp),
|
||||||
|
text = stringResourceSafe(R.string.onramp_recommended_title),
|
||||||
SpacerH(8.dp)
|
style = TangemTheme.typography.subtitle2,
|
||||||
|
color = TangemTheme.colors.text.tertiary,
|
||||||
|
)
|
||||||
|
SpacerH(8.dp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
state.recommended.fastForEach { offer ->
|
state.recommended.fastForEach { offer ->
|
||||||
key("${offer.paymentMethod.id} ${offer.providerName} ${offer.rate}") {
|
key("${offer.paymentMethod.id} ${offer.providerName} ${offer.rate}") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue