From 933dfb16e743da26edf199f5a7592b78b3c75a73 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 11 Jul 2024 15:39:24 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../feature/swap/domain/models/ui/SwapState.kt | 1 - .../tangem/feature/swap/domain/SwapInteractorImpl.kt | 12 ++++++------ .../feature/swap/ui/SwapPermissionBottomSheet.kt | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/ui/SwapState.kt b/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/ui/SwapState.kt index d7ba6d0ac0..2616e04be8 100644 --- a/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/ui/SwapState.kt +++ b/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/ui/SwapState.kt @@ -26,7 +26,6 @@ sealed interface SwapState { val permissionState: PermissionDataState = PermissionDataState.Empty, val swapDataModel: SwapDataModel? = null, val txFee: TxFeeState, - // val txFeeIncludeOtherNativeFee: TxFeeState, val warnings: List = emptyList(), val swapProvider: SwapProvider, ) : SwapState diff --git a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt index c4cb77423f..c1be6a25bd 100644 --- a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt +++ b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt @@ -1529,7 +1529,7 @@ internal class SwapInteractorImpl @Inject constructor( amount = priorityFeeValue, decimals = normalFee.fee.decimals, ) - // + // endregion // region fees include otherNativeFee val feesFiatWithNative = getFormattedFiatFees( fromToken = fromToken, @@ -1548,7 +1548,7 @@ internal class SwapInteractorImpl @Inject constructor( amount = priorityFeeValue + otherNativeFeeValue, decimals = normalFee.fee.decimals, ) - // + // endregion return TxFeeState.MultipleFeeState( normalFee = TxFee( feeValue = normalFeeValue, @@ -1602,7 +1602,7 @@ internal class SwapInteractorImpl @Inject constructor( amount = normalFeeValue + otherNativeFeeValue, decimals = singleFee.fee.decimals, ) - // + // endregion return TxFeeState.SingleFeeState( fee = TxFee( feeValue = normalFeeValue, @@ -1645,7 +1645,7 @@ internal class SwapInteractorImpl @Inject constructor( // region otherNativeFee val normalFeeWithOtherNative = feeNormal + otherNativeFeeValue - val priorityFeeWithOtherNative = feeNormal + otherNativeFeeValue + val priorityFeeWithOtherNative = feePriority + otherNativeFeeValue val normalFiatValueWithNative = getFormattedFiatFees(fromToken, normalFeeWithOtherNative)[0] val priorityFiatValueWithNative = getFormattedFiatFees(fromToken, priorityFeeWithOtherNative)[0] @@ -1657,7 +1657,7 @@ internal class SwapInteractorImpl @Inject constructor( amount = priorityFeeWithOtherNative, decimals = priorityFee.amount.decimals, ) - // + // endregion TxFeeState.MultipleFeeState( normalFee = TxFee( feeValue = feeNormal, @@ -1700,7 +1700,7 @@ internal class SwapInteractorImpl @Inject constructor( amount = normalFeeWithOtherNative, decimals = this.normal.amount.decimals, ) - // + // endregion TxFeeState.SingleFeeState( fee = TxFee( feeValue = this.normal.amount.value ?: BigDecimal.ZERO, diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/SwapPermissionBottomSheet.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/SwapPermissionBottomSheet.kt index 1915863d98..6c06e7e630 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/SwapPermissionBottomSheet.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/SwapPermissionBottomSheet.kt @@ -304,7 +304,7 @@ private fun Preview_AgreementBottomSheet() { private val previewData = GivePermissionBottomSheetConfig( data = SwapPermissionState.ReadyForRequest( - providerName = "1icnh", + providerName = "1inch", currency = "DAI", amount = "∞", walletAddress = "",