Updated on 2026-08-14

This commit is contained in:
Tangem 2024-02-26 16:25:17 +08:00
parent ccb4794a8b
commit 85d1614dd4

View file

@ -665,7 +665,9 @@ internal class SwapInteractorImpl @Inject constructor(
blockchain == Blockchain.Aptos -> {
Fee.Aptos(
amount = feeAmount,
gasUnitPrice = fee.feeValue.toLong() / fee.gasLimit,
gasUnitPrice = fee.feeValue.divide(BigDecimal(fee.gasLimit))
.movePointRight(Blockchain.Aptos.decimals())
.toLong(),
gasLimit = fee.gasLimit.toLong(),
)
}
@ -1358,7 +1360,7 @@ internal class SwapInteractorImpl @Inject constructor(
is Fee.Common -> 0
is Fee.Ethereum -> gasLimit.toInt()
is Fee.VeChain -> gasLimit.toInt()
is Fee.Aptos -> amount.longValue?.div(gasUnitPrice)?.toInt() ?: 0
is Fee.Aptos -> gasLimit.toInt()
}
}