From 188c058b2363383ff0e657841f90811aa50a2e8a Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 26 Jan 2024 18:20:04 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../com/tangem/feature/swap/domain/SwapInteractorImpl.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt index 58d2b33488..7078bd5b1a 100644 --- a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt +++ b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt @@ -646,8 +646,8 @@ internal class SwapInteractorImpl @Inject constructor( type = AmountType.Coin, ) - return when (blockchain) { - Blockchain.Ethereum -> { + return when { + blockchain.isEvm() -> { val feeAmountWithDecimals = feeAmountValue.movePointRight(fee.decimals) Fee.Ethereum( amount = feeAmount, @@ -655,12 +655,12 @@ internal class SwapInteractorImpl @Inject constructor( gasPrice = (feeAmountWithDecimals / fee.gasLimit.toBigDecimal()).toBigInteger(), ) } - Blockchain.Vechain -> Fee.Vechain( + blockchain == Blockchain.Vechain -> Fee.Vechain( amount = feeAmount, gasPriceCoef = Fee.Vechain.getGasPriceCoef(fee.gasLimit.toLong(), fee.feeValue), gasLimit = fee.gasLimit.toLong(), ) - Blockchain.Aptos -> { + blockchain == Blockchain.Aptos -> { Fee.Aptos( amount = feeAmount, gasUnitPrice = fee.feeValue.toLong() / fee.gasLimit,