Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-01 15:32:39 +04:00
commit 61958c0c63
2 changed files with 7 additions and 7 deletions

View file

@ -6,7 +6,7 @@ import java.math.BigInteger
import java.math.RoundingMode
private val HUNDRED_PERCENT = 100.toBigInteger() // base 100%
val INCREASE_GAS_LIMIT_FOR_SUPPLY = 120.toBigInteger() // 20% increase
val INCREASE_GAS_LIMIT_FOR_SUPPLY = 140.toBigInteger() // 20% increase
fun Fee.fixFee(cryptoCurrency: CryptoCurrency, gasLimit: BigInteger): Fee = when (this) {
is Fee.Ethereum.Legacy -> copy(

View file

@ -316,9 +316,9 @@ class YieldSupplyEstimateEnterFeeUseCaseTest {
val deployFee = txs.first().fee as Fee.Ethereum.EIP1559
val approveFee = txs[1].fee as Fee.Ethereum.EIP1559
val enterFee = txs.last().fee as Fee.Ethereum.EIP1559
Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_200))
Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_400))
Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(3_600))
Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_400))
Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_800))
Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(4_200))
}
@Test
@ -355,9 +355,9 @@ class YieldSupplyEstimateEnterFeeUseCaseTest {
val deployFee = txs.first().fee as Fee.Ethereum.Legacy
val approveFee = txs[1].fee as Fee.Ethereum.Legacy
val enterFee = txs.last().fee as Fee.Ethereum.Legacy
Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_200))
Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_400))
Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(3_600))
Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_400))
Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_800))
Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(4_200))
}
private fun getDeployTx() = uncompiled(