Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-07 20:23:54 +05:00
parent 0c55931ddc
commit 7f17dfa2e3
6 changed files with 15 additions and 45 deletions

View file

@ -71,7 +71,7 @@ internal fun StakingConfirmationContent(
isClickable = !isTransactionInProgress,
onClick = clickIntents::openValidators,
)
StakingFeeBlock(feeState = state.feeState, isTransactionSent = isTransactionSent)
StakingFeeBlock(feeState = state.feeState)
NotificationsBlock(notifications = state.notifications)
Spacer(Modifier)
}

View file

@ -32,17 +32,12 @@ import com.tangem.features.staking.impl.presentation.state.FeeState
import java.math.BigDecimal
@Composable
internal fun StakingFeeBlock(feeState: FeeState, isTransactionSent: Boolean) {
val backgroundColor = if (isTransactionSent) {
TangemTheme.colors.background.action
} else {
TangemTheme.colors.button.disabled
}
internal fun StakingFeeBlock(feeState: FeeState) {
Column(
modifier = Modifier
.fillMaxWidth()
.clip(TangemTheme.shapes.roundedCornersXMedium)
.background(backgroundColor)
.background(TangemTheme.colors.background.action)
.padding(TangemTheme.dimens.spacing12),
) {
Text(
@ -144,10 +139,7 @@ private fun BoxScope.FeeError(feeState: FeeState) {
@Composable
private fun FeeBlockPreview(@PreviewParameter(FeeBlockPreviewProvider::class) value: FeeState) {
TangemThemePreview {
StakingFeeBlock(
feeState = value,
isTransactionSent = false,
)
StakingFeeBlock(feeState = value)
}
}