Updated on 2026-08-14

This commit is contained in:
Tangem 2025-08-26 10:38:49 +05:00
parent 57f3a55298
commit adfbf8d277
3 changed files with 40 additions and 18 deletions

View file

@ -127,6 +127,9 @@ internal class FeeSelectorModel @Inject constructor(
)
}
uiState.update(FeeItemSelectedTransformer(feeItem))
if (feeItem !is FeeItem.Custom) {
onDoneClick()
}
}
override fun onCustomFeeValueChange(index: Int, value: String) {

View file

@ -82,15 +82,19 @@ internal fun FeeSelectorModalBottomSheet(
modifier = Modifier.padding(vertical = 4.dp, horizontal = 12.dp),
)
},
footer = {
PrimaryButton(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
enabled = state.isPrimaryButtonEnabled,
text = stringResourceSafe(R.string.common_done),
onClick = feeSelectorIntents::onDoneClick,
)
footer = if (state.selectedFeeItem is FeeItem.Custom) {
{
PrimaryButton(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
enabled = state.isPrimaryButtonEnabled,
text = stringResourceSafe(R.string.common_done),
onClick = feeSelectorIntents::onDoneClick,
)
}
} else {
null
},
)
}
@ -426,7 +430,14 @@ private class FeeSelectorUMContentProvider : CollectionPreviewParameterProvider<
FeeItem.Fast(fee = Fee.Common(Amount(value = BigDecimal("0.03"), blockchain = Blockchain.Ethereum))),
customFeeItem,
),
selectedFeeItem = customFeeItem,
selectedFeeItem = FeeItem.Slow(
fee = Fee.Common(
Amount(
value = BigDecimal("0.01"),
blockchain = Blockchain.Ethereum,
),
),
),
feeExtraInfo = FeeExtraInfo(
isFeeApproximate = true,
isFeeConvertibleToFiat = true,