Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-16 04:40:37 -07:00
parent 2a41321e74
commit 0b81b905c3
3 changed files with 7 additions and 2 deletions

View file

@ -48,7 +48,10 @@ internal class TangemPayCurrentPlanModel @Inject constructor(
notification = createNotification(customerPlan),
sections = buildSections(customerPlan.plan),
onBackClick = router::pop,
onChangePlanClick = { router.push(TangemPayAccountDetailsInnerRoute.SelectPlan(params.tariffPlan)) },
onChangePlanClick = { router.push(TangemPayAccountDetailsInnerRoute.SelectPlan(params.tariffPlan)) }
.takeIf {
customerPlan.status != TangemPayCustomerTariffPlan.Status.DOWNGRADE_PENDING
},
)
private fun createNotification(customerPlan: TangemPayCustomerTariffPlan): TangemPayCurrentPlanUM.Notification? {

View file

@ -173,6 +173,8 @@ private fun PlanInfoRow(item: TangemPayCurrentPlanUM.InfoItem, modifier: Modifie
@Composable
private fun ChangePlanFooter(state: TangemPayCurrentPlanUM, modifier: Modifier = Modifier) {
if (state.onChangePlanClick == null) return
Column(
modifier = modifier
.fillMaxWidth()

View file

@ -10,7 +10,7 @@ internal data class TangemPayCurrentPlanUM(
val notification: Notification?,
val sections: ImmutableList<Section>,
val onBackClick: () -> Unit,
val onChangePlanClick: () -> Unit,
val onChangePlanClick: (() -> Unit)?,
) {
@Immutable
data class Notification(