Updated on 2026-08-14
This commit is contained in:
parent
0c470faf50
commit
37af65e9c4
3 changed files with 5 additions and 1 deletions
|
|
@ -610,6 +610,7 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
requestApproveData = RequestApproveStateData(
|
||||
fee = feeState,
|
||||
approveData = transactionData,
|
||||
fromTokenAmount = swapAmount,
|
||||
),
|
||||
),
|
||||
preparedSwapConfigState = quotesLoadedState.preparedSwapConfigState.copy(
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ data class TokenSwapInfo(
|
|||
data class RequestApproveStateData(
|
||||
val fee: TxFeeState,
|
||||
val approveData: String,
|
||||
val fromTokenAmount: SwapAmount,
|
||||
)
|
||||
|
||||
data class SwapStateData(
|
||||
|
|
|
|||
|
|
@ -490,7 +490,9 @@ internal class SwapViewModel @Inject constructor(
|
|||
},
|
||||
onSelectItemFee = { feeItem ->
|
||||
dataState = dataState.copy(selectedFee = feeItem.data)
|
||||
val spendAmount = dataState.swapDataModel?.swapModel?.fromTokenAmount ?: return@UiActions
|
||||
val spendAmount = dataState.swapDataModel?.swapModel?.fromTokenAmount
|
||||
?: dataState.approveDataModel?.fromTokenAmount
|
||||
spendAmount ?: return@UiActions
|
||||
val fromToken = dataState.fromCurrency ?: return@UiActions
|
||||
viewModelScope.launch(dispatchers.io) {
|
||||
val isFeeEnough = swapInteractor.checkFeeIsEnough(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue