Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-05 20:11:39 +05:00
parent 802b914e78
commit 506c1bb737
4 changed files with 8 additions and 8 deletions

View file

@ -169,8 +169,8 @@ internal object YieldSupplyDomainModule {
yieldSupplyRepository: YieldSupplyRepository,
quotesRepository: QuotesRepository,
currenciesRepository: CurrenciesRepository,
): YieldSupplyGetTokenMaxFeeUseCase {
return YieldSupplyGetTokenMaxFeeUseCase(
): YieldSupplyGetMaxFeeUseCase {
return YieldSupplyGetMaxFeeUseCase(
yieldSupplyRepository = yieldSupplyRepository,
quotesRepository = quotesRepository,
currenciesRepository = currenciesRepository,

View file

@ -25,7 +25,7 @@ import java.math.RoundingMode
* Uses YieldMarketToken.maxFeeNative and the same conversion logic as
* [YieldSupplyGetCurrentFeeUseCase].
*/
class YieldSupplyGetTokenMaxFeeUseCase(
class YieldSupplyGetMaxFeeUseCase(
private val yieldSupplyRepository: YieldSupplyRepository,
private val quotesRepository: QuotesRepository,
private val currenciesRepository: CurrenciesRepository,

View file

@ -21,7 +21,7 @@ import com.tangem.domain.yield.supply.usecase.YieldSupplyGetProtocolBalanceUseCa
import com.tangem.domain.yield.supply.usecase.YieldSupplyGetTokenStatusUseCase
import com.tangem.domain.yield.supply.usecase.YieldSupplyMinAmountUseCase
import com.tangem.domain.yield.supply.usecase.YieldSupplyGetCurrentFeeUseCase
import com.tangem.domain.yield.supply.usecase.YieldSupplyGetTokenMaxFeeUseCase
import com.tangem.domain.yield.supply.usecase.YieldSupplyGetMaxFeeUseCase
import com.tangem.features.yield.supply.api.analytics.YieldSupplyAnalytics
import com.tangem.features.yield.supply.impl.R
import com.tangem.features.yield.supply.impl.subcomponents.active.YieldSupplyActiveComponent
@ -50,7 +50,7 @@ internal class YieldSupplyActiveModel @Inject constructor(
private val yieldSupplyGetTokenStatusUseCase: YieldSupplyGetTokenStatusUseCase,
private val yieldSupplyMinAmountUseCase: YieldSupplyMinAmountUseCase,
private val yieldSupplyGetCurrentFeeUseCase: YieldSupplyGetCurrentFeeUseCase,
private val yieldSupplyGetTokenMaxFeeUseCase: YieldSupplyGetTokenMaxFeeUseCase,
private val yieldSupplyGetMaxFeeUseCase: YieldSupplyGetMaxFeeUseCase,
private val getSelectedAppCurrencyUseCase: GetSelectedAppCurrencyUseCase,
) : Model() {
@ -237,7 +237,7 @@ internal class YieldSupplyActiveModel @Inject constructor(
cryptoCurrencyStatus = cryptoStatus,
).getOrNull()
val maxFee = yieldSupplyGetTokenMaxFeeUseCase(
val maxFee = yieldSupplyGetMaxFeeUseCase(
userWallet = params.userWallet,
cryptoCurrencyStatus = cryptoStatus,
).getOrNull()

View file

@ -62,7 +62,7 @@ internal class YieldSupplyStartEarningModel @Inject constructor(
private val yieldSupplyAlertFactory: YieldSupplyAlertFactory,
private val yieldSupplyActivateUseCase: YieldSupplyActivateUseCase,
private val yieldSupplyMinAmountUseCase: YieldSupplyMinAmountUseCase,
private val yieldSupplyGetTokenMaxFeeUseCase: YieldSupplyGetTokenMaxFeeUseCase,
private val yieldSupplyGetMaxFeeUseCase: YieldSupplyGetMaxFeeUseCase,
private val yieldSupplyRepository: YieldSupplyRepository,
) : Model(), YieldSupplyNotificationsComponent.ModelCallback {
@ -137,7 +137,7 @@ internal class YieldSupplyStartEarningModel @Inject constructor(
it.copy(yieldSupplyFeeUM = YieldSupplyFeeUM.Loading)
}
val maxFee = yieldSupplyGetTokenMaxFeeUseCase(userWallet, cryptoCurrencyStatus).getOrNull() ?: return
val maxFee = yieldSupplyGetMaxFeeUseCase(userWallet, cryptoCurrencyStatus).getOrNull() ?: return
val transactionListData = yieldSupplyStartEarningUseCase(
userWalletId = userWallet.walletId,