Updated on 2026-08-14
This commit is contained in:
commit
9ff08a73fa
3 changed files with 10 additions and 3 deletions
|
|
@ -145,6 +145,7 @@ sealed interface SwapWarning {
|
|||
data class TooSmallAmountWarning(val notificationConfig: NotificationConfig) : SwapWarning
|
||||
data class UnableToCoverFeeWarning(val notificationConfig: NotificationConfig) : SwapWarning
|
||||
data class GeneralWarning(val notificationConfig: NotificationConfig) : SwapWarning
|
||||
data class GeneralInformational(val notificationConfig: NotificationConfig) : SwapWarning
|
||||
data class TransactionInProgressWarning(val title: TextReference, val description: TextReference) : SwapWarning
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ internal class StateBuilder(
|
|||
when (it) {
|
||||
is Warning.ExistentialDepositWarning -> {
|
||||
warnings.add(
|
||||
SwapWarning.GeneralWarning(
|
||||
SwapWarning.GeneralInformational(
|
||||
NotificationConfig(
|
||||
title = resourceReference(R.string.warning_existential_deposit_title),
|
||||
subtitle = resourceReference(
|
||||
|
|
@ -379,7 +379,7 @@ internal class StateBuilder(
|
|||
it.existentialDeposit.toPlainString(),
|
||||
),
|
||||
),
|
||||
iconResId = R.drawable.img_attention_20,
|
||||
iconResId = R.drawable.ic_alert_circle_24,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ private fun SwapButton(state: SwapStateHolder, modifier: Modifier = Modifier) {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("LongMethod")
|
||||
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
||||
@Composable
|
||||
private fun SwapWarnings(warnings: List<SwapWarning>) {
|
||||
Column(
|
||||
|
|
@ -369,6 +369,12 @@ private fun SwapWarnings(warnings: List<SwapWarning>) {
|
|||
config = warning.notificationConfig,
|
||||
)
|
||||
}
|
||||
is SwapWarning.GeneralInformational -> {
|
||||
Notification(
|
||||
config = warning.notificationConfig,
|
||||
iconTint = TangemTheme.colors.icon.accent,
|
||||
)
|
||||
}
|
||||
is SwapWarning.TransactionInProgressWarning -> {
|
||||
CardWithIcon(
|
||||
title = warning.title.resolveReference(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue