Updated on 2026-08-14
This commit is contained in:
parent
a3b65cd194
commit
d22bfd0c87
27 changed files with 342 additions and 139 deletions
|
|
@ -45,6 +45,7 @@ internal class DefaultFeeSelectorBlockComponent @AssistedInject constructor(
|
|||
params = FeeSelectorParams.FeeSelectorDetailsParams(
|
||||
state = model.uiState.value,
|
||||
onLoadFee = params.onLoadFee,
|
||||
onDisableCustomFee = params.onDisableCustomFee,
|
||||
onLoadFeeExtended = params.onLoadFeeExtended,
|
||||
feeCryptoCurrencyStatus = params.feeCryptoCurrencyStatus,
|
||||
cryptoCurrencyStatus = params.cryptoCurrencyStatus,
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ internal class FeeSelectorLogic @AssistedInject constructor(
|
|||
feeStateConfiguration = params.feeStateConfiguration,
|
||||
isFeeApproximate = isFeeApproximate(fee.transactionFee.normal.amount.type),
|
||||
feeSelectorIntents = this@FeeSelectorLogic,
|
||||
shouldDisableCustomFee = params.onDisableCustomFee(),
|
||||
),
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ internal class FeeItemConverter(
|
|||
private val feeSelectorIntents: FeeSelectorIntents,
|
||||
private val appCurrency: AppCurrency,
|
||||
cryptoCurrencyStatus: CryptoCurrencyStatus,
|
||||
private val shouldDisableCustomFee: Boolean,
|
||||
) : Converter<FeeItemConverter.Input, ImmutableList<FeeItem>> {
|
||||
|
||||
private val customFeeFieldConverter = FeeSelectorCustomFieldConverter(
|
||||
|
|
@ -54,8 +55,10 @@ internal class FeeItemConverter(
|
|||
add(FeeItem.Market(fee = value.transactionFee.normal))
|
||||
}
|
||||
}
|
||||
val customFee = value.customFee ?: constructCustomFee()
|
||||
customFee?.let(::add)
|
||||
if (!shouldDisableCustomFee) {
|
||||
val customFee = value.customFee ?: constructCustomFee()
|
||||
customFee?.let(::add)
|
||||
}
|
||||
}
|
||||
|
||||
private fun MutableList<FeeItem>.addFeeItemsLimited(value: Input) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ internal class FeeSelectorLoadedTransformer(
|
|||
private val feeStateConfiguration: FeeSelectorParams.FeeStateConfiguration,
|
||||
private val isFeeApproximate: Boolean,
|
||||
private val feeSelectorIntents: FeeSelectorIntents,
|
||||
private val shouldDisableCustomFee: Boolean,
|
||||
) : Transformer<FeeSelectorUM> {
|
||||
|
||||
private val feeItemsConverter = FeeItemConverter(
|
||||
|
|
@ -30,6 +31,7 @@ internal class FeeSelectorLoadedTransformer(
|
|||
feeSelectorIntents = feeSelectorIntents,
|
||||
appCurrency = appCurrency,
|
||||
cryptoCurrencyStatus = feeCryptoCurrencyStatus,
|
||||
shouldDisableCustomFee = shouldDisableCustomFee,
|
||||
)
|
||||
|
||||
override fun transform(prevState: FeeSelectorUM): FeeSelectorUM {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue