Updated on 2026-08-14

This commit is contained in:
Tangem 2024-03-26 12:54:37 +00:00
parent 4c9d4cc544
commit 4dba6e3c3d

View file

@ -410,11 +410,11 @@ internal class StateBuilder(
fromToken: CryptoCurrency,
warnings: MutableList<SwapWarning>,
) {
val feeEnoughState = quoteModel.preparedSwapConfigState.feeState
if (feeEnoughState is SwapFeeState.NotEnough &&
quoteModel.preparedSwapConfigState.isBalanceEnough &&
quoteModel.permissionState !is PermissionDataState.PermissionLoading
) {
val feeEnoughState = quoteModel.preparedSwapConfigState.feeState as? SwapFeeState.NotEnough ?: return
val needShowCoverWarning = quoteModel.preparedSwapConfigState.isBalanceEnough &&
quoteModel.permissionState !is PermissionDataState.PermissionLoading &&
feeEnoughState.feeCurrency != fromToken
if (needShowCoverWarning) {
warnings.add(
SwapWarning.UnableToCoverFeeWarning(
createUnableToCoverFeeNotificationConfig(