Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-13 12:28:51 +03:00
parent 06cf8cad51
commit 06d139362e
5 changed files with 23 additions and 9 deletions

View file

@ -64,6 +64,7 @@ internal class SetConfirmationStateLoadingTransformer(
fiatAmount = potentialReward,
fiatCurrencyCode = appCurrency.code,
fiatCurrencySymbol = appCurrency.symbol,
withApproximateSign = true,
)
return if (isEnterAction && amountDecimal != null && potentialReward != null) {
resourceReference(

View file

@ -41,19 +41,20 @@ internal object SetTitleTransformer : Transformer<StakingUiState> {
val confirmationState = prevState.confirmationState as? StakingStates.ConfirmationState.Data
val title = confirmationState?.pendingAction?.type?.getPendingActionTitle()
title?.takeIf { it.isNullOrEmpty() }
title.takeIf { !it.isNullOrEmpty() }
?: resourceReference(
R.string.staking_title_stake,
wrappedList(prevState.cryptoCurrencyName),
id = R.string.staking_title_stake,
formatArgs = wrappedList(prevState.cryptoCurrencyName),
)
}
}
}
}
val subtitle = when (currentStep) {
StakingStep.Confirmation -> stringReference(prevState.walletName)
else -> null
val subtitle = if (currentStep == StakingStep.Confirmation && actionType == StakingActionCommonType.ENTER) {
stringReference(prevState.walletName)
} else {
null
}
return prevState.copy(

View file

@ -59,8 +59,8 @@ internal fun StakingConfirmationContent(
}
AmountBlock(
amountState = amountState,
isClickDisabled = !isEnterAction,
isEditingDisabled = !isEnterAction || isTransactionSent,
isClickDisabled = !isEnterAction || isTransactionSent,
isEditingDisabled = !isEnterAction && state.innerState != InnerConfirmationStakingState.COMPLETED,
onClick = clickIntents::onPrevClick,
)
if (isEnterAction) {

View file

@ -83,6 +83,7 @@ internal fun StakingFeeBlock(feeState: FeeState, isTransactionSent: Boolean) {
titleRes = R.string.common_fee_selector_option_market,
iconRes = R.drawable.ic_bird_24,
paddingValues = PaddingValues(),
showDivider = false,
)
FeeLoading(feeState)
}