Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-09 11:08:51 +05:00
parent ad0f9678d7
commit 8fef557424
2 changed files with 4 additions and 6 deletions

View file

@ -16,6 +16,7 @@ internal sealed class SendAmountComponentParams {
abstract val userWallet: UserWallet
abstract val appCurrency: AppCurrency
abstract val cryptoCurrencyStatus: CryptoCurrencyStatus
abstract val predefinedAmountValue: String?
data class AmountParams(
override val state: AmountState,
@ -23,10 +24,10 @@ internal sealed class SendAmountComponentParams {
override val userWallet: UserWallet,
override val appCurrency: AppCurrency,
override val cryptoCurrencyStatus: CryptoCurrencyStatus,
override val predefinedAmountValue: String?,
val isEditMode: Boolean,
val callback: ModelCallback,
val currentRoute: Flow<SendRoute.Amount>,
val predefinedAmountValue: String?,
val isBalanceHidingFlow: StateFlow<Boolean>,
) : SendAmountComponentParams()
@ -36,8 +37,8 @@ internal sealed class SendAmountComponentParams {
override val userWallet: UserWallet,
override val appCurrency: AppCurrency,
override val cryptoCurrencyStatus: CryptoCurrencyStatus,
override val predefinedAmountValue: String?,
val blockClickEnableFlow: StateFlow<Boolean>,
val predefinedAmountValue: String?,
val isPredefinedValues: Boolean,
) : SendAmountComponentParams()
}

View file

@ -98,10 +98,7 @@ internal class SendAmountModel @Inject constructor(
),
)
}
val params = params as? SendAmountComponentParams.AmountBlockParams
if (params?.predefinedAmountValue != null) {
onAmountValueChange(params.predefinedAmountValue)
}
params.predefinedAmountValue?.let(::onAmountValueChange)
}
}