Updated on 2026-08-14

This commit is contained in:
Tangem 2024-07-11 15:39:24 +02:00
parent 8c58005fed
commit 933dfb16e7
3 changed files with 7 additions and 8 deletions

View file

@ -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<Warning> = emptyList(),
val swapProvider: SwapProvider,
) : SwapState

View file

@ -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,

View file

@ -304,7 +304,7 @@ private fun Preview_AgreementBottomSheet() {
private val previewData = GivePermissionBottomSheetConfig(
data = SwapPermissionState.ReadyForRequest(
providerName = "1icnh",
providerName = "1inch",
currency = "DAI",
amount = "",
walletAddress = "",