Updated on 2026-08-14
This commit is contained in:
parent
d54f8452b6
commit
c1935b5938
9 changed files with 24 additions and 29 deletions
|
|
@ -54,7 +54,7 @@ class RequestFeeMiddleware {
|
|||
val result = feeResult.data
|
||||
// val result = FeeMock.getFee(walletManager.wallet.blockchain)
|
||||
dispatch(FeeAction.FeeCalculation.SetFeeResult(result))
|
||||
when(result) {
|
||||
when (result) {
|
||||
is TransactionFee.Single -> {
|
||||
val fee = result.normal.amount.value ?: BigDecimal.ZERO
|
||||
if (fee.isZero()) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.tap.features.send.redux.reducers
|
||||
|
||||
import com.tangem.blockchain.common.Amount
|
||||
import com.tangem.blockchain.common.transaction.Fee
|
||||
import com.tangem.blockchain.common.transaction.TransactionFee
|
||||
import com.tangem.tap.features.send.redux.FeeAction
|
||||
|
|
@ -9,7 +8,6 @@ import com.tangem.tap.features.send.redux.SendScreenAction
|
|||
import com.tangem.tap.features.send.redux.states.FeeState
|
||||
import com.tangem.tap.features.send.redux.states.FeeType
|
||||
import com.tangem.tap.features.send.redux.states.SendState
|
||||
import com.tangem.tap.features.send.redux.states.TransactionExtrasState
|
||||
import com.tangem.tap.features.wallet.redux.ProgressState
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +32,7 @@ class FeeReducer : SendInternalReducer {
|
|||
}
|
||||
state.copy(
|
||||
selectedFeeType = action.feeType,
|
||||
currentFee = currentFee
|
||||
currentFee = currentFee,
|
||||
)
|
||||
}
|
||||
is FeeActionUi.ChangeIncludeFee -> state.copy(feeIsIncluded = action.isIncluded)
|
||||
|
|
@ -43,7 +41,6 @@ class FeeReducer : SendInternalReducer {
|
|||
}
|
||||
|
||||
private fun handleAction(action: FeeAction, sendState: SendState, state: FeeState): SendState {
|
||||
|
||||
val result = when (action) {
|
||||
is FeeAction.RequestFee -> {
|
||||
state.copy(progressState = ProgressState.Loading)
|
||||
|
|
@ -122,6 +119,4 @@ class FeeReducer : SendInternalReducer {
|
|||
private fun getCurrentFeeType(state: FeeState): FeeType {
|
||||
return if (state.selectedFeeType == FeeType.SINGLE) FeeType.NORMAL else state.selectedFeeType
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.tap.features.send.redux.states
|
||||
|
||||
import com.tangem.blockchain.common.Amount
|
||||
import com.tangem.blockchain.common.transaction.Fee
|
||||
import com.tangem.blockchain.common.transaction.TransactionFee
|
||||
import com.tangem.tap.common.analytics.events.AnalyticsParam
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue