Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-20 12:37:35 +04:00
parent 9678c49b37
commit c7269fbadb

View file

@ -1950,6 +1950,7 @@ internal class SwapInteractorImpl @Inject constructor(
private fun Fee.increaseGasLimitBy(percentage: Int): Fee {
if (this !is Fee.Ethereum) return this
val gasLimit = this.gasLimit
if (gasLimit == BigInteger.ZERO) return this
val increasedGasPrice = this.amount.value?.movePointRight(this.amount.decimals)
?.divide(gasLimit.toBigDecimal(), RoundingMode.HALF_UP)
val increasedGasLimit = gasLimit.multiply(percentage.toBigInteger()).divide(hundredPercent)