Updated on 2026-08-14
This commit is contained in:
parent
8c58005fed
commit
933dfb16e7
3 changed files with 7 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ private fun Preview_AgreementBottomSheet() {
|
|||
|
||||
private val previewData = GivePermissionBottomSheetConfig(
|
||||
data = SwapPermissionState.ReadyForRequest(
|
||||
providerName = "1icnh",
|
||||
providerName = "1inch",
|
||||
currency = "DAI",
|
||||
amount = "∞",
|
||||
walletAddress = "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue